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.
42 lines
913 B
42 lines
913 B
5 years ago
|
package main
|
||
|
|
||
5 years ago
|
import "../lib"
|
||
5 years ago
|
|
||
5 years ago
|
func main() {
|
||
5 years ago
|
table := [][]string{{
|
||
|
"? love",
|
||
|
"? is",
|
||
|
"A loveis",
|
||
|
"? love",
|
||
|
"? Who",
|
||
|
"A Whoareyou",
|
||
|
"? is",
|
||
|
}}
|
||
5 years ago
|
|
||
5 years ago
|
sets := [][]string{
|
||
5 years ago
|
{"An", "array", "variable", "denotes", "the", "entire", "array"},
|
||
|
{"This", "means", "that", "when", "you", "assign", "or", "pass"},
|
||
|
{"To", "avoid", "the", "copy", "you", "could", "pass"},
|
||
|
{"struct", "but", "with", "indexed", "rather", "than", "named", "fields"},
|
||
5 years ago
|
}
|
||
5 years ago
|
ops := []string{
|
||
5 years ago
|
"?", "x", "A",
|
||
|
}
|
||
|
|
||
|
for i := 0; i < 6; i++ {
|
||
|
result := []string{}
|
||
5 years ago
|
nOps := lib.RandIntBetween(3, 15)
|
||
|
index := lib.RandIntBetween(0, len(sets)-1)
|
||
5 years ago
|
for j := 0; j < nOps; j++ {
|
||
5 years ago
|
k := lib.RandIntBetween(0, len(ops)-1)
|
||
|
s := lib.RandIntBetween(0, len(sets[index])-1)
|
||
5 years ago
|
result = append(result, ops[k]+" "+sets[index][s])
|
||
5 years ago
|
}
|
||
5 years ago
|
table = append(table, result)
|
||
5 years ago
|
}
|
||
|
|
||
5 years ago
|
for _, arg := range table {
|
||
5 years ago
|
lib.ChallengeMain("nenokku", arg...)
|
||
5 years ago
|
}
|
||
|
}
|