mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
395 B
33 lines
395 B
5 years ago
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
5 years ago
|
"os"
|
||
5 years ago
|
"strings"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
var big string
|
||
|
args := os.Args[1:]
|
||
|
|
||
|
for _, arg := range args {
|
||
|
split := strings.Split(arg, " ")
|
||
|
ch := split[0]
|
||
|
small := split[1]
|
||
|
|
||
|
if ch == "x" {
|
||
|
break
|
||
|
}
|
||
|
if ch == "A" {
|
||
5 years ago
|
big += small
|
||
5 years ago
|
}
|
||
|
if ch == "?" {
|
||
5 years ago
|
if strings.Contains(big, small) {
|
||
5 years ago
|
fmt.Println("YES")
|
||
|
} else {
|
||
|
fmt.Println("NO")
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|