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.
34 lines
569 B
34 lines
569 B
5 years ago
|
package main
|
||
5 years ago
|
|
||
|
import (
|
||
5 years ago
|
"github.com/01-edu/z01"
|
||
|
|
||
5 years ago
|
solutions "./solutions"
|
||
|
student "./student"
|
||
|
)
|
||
|
|
||
5 years ago
|
func main() {
|
||
5 years ago
|
// testing examples of subjects
|
||
|
table := []int{
|
||
|
5, 3,
|
||
|
5, 1,
|
||
|
1, 1,
|
||
|
1, 5,
|
||
|
}
|
||
|
|
||
|
// testing special cases and one valid random case.
|
||
|
table = append(table,
|
||
|
0, 0,
|
||
|
-1, 6,
|
||
|
6, -1,
|
||
|
z01.RandIntBetween(1, 20), z01.RandIntBetween(1, 20),
|
||
|
)
|
||
|
|
||
5 years ago
|
// Tests all possibilities including 0 0, -x y, x -y
|
||
|
for i := 0; i < len(table); i += 2 {
|
||
5 years ago
|
if i != len(table)-1 {
|
||
5 years ago
|
z01.Challenge("Raid1b", solutions.Raid1b, student.Raid1b, table[i], table[i+1])
|
||
5 years ago
|
}
|
||
|
}
|
||
|
}
|