-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck
executable file
·68 lines (56 loc) · 1.42 KB
/
check
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
# Please don't change this.
MAX_POINTS=150
test_supercomputer() {
n_tests=30
src_names=(supercomputer.c supercomputer.cpp Supercomputer.java)
tests=($(seq 0 $(($n_tests - 1))))
points=($(printf '1.0 %.0s' $(seq 0 $(($n_tests - 1)))))
pmax=30
run_problem supercomputer 1
}
test_ferate() {
n_tests=35
src_names=(ferate.c ferate.cpp Ferate.java)
tests=($(seq 0 $(($n_tests - 1))))
points=($(printf '1.0 %.0s' $(seq 0 $(($n_tests - 1)))))
pmax=35
run_problem ferate 2
}
test_teleportare() {
n_tests=40
src_names=(teleportare.c teleportare.cpp Teleportare.java)
tests=($(seq 0 $(($n_tests - 1))))
points=($(printf '1.0 %.0s' $(seq 0 $(($n_tests - 1)))))
pmax=40
run_problem teleportare 3
}
test_magazin() {
n_tests=30
src_names=(magazin.c magazin.cpp Magazin.java)
tests=($(seq 0 $(($n_tests - 1))))
points=($(printf '1.0 %.0s' $(seq 0 $(($n_tests - 1)))))
pmax=30
run_problem magazin 4
}
test_homework() {
if [[ "$1" = "1" || "$1" = "supercomputer" ]]; then
test_supercomputer
elif [[ "$1" = "2" || "$1" = "ferate" ]]; then
test_ferate
elif [[ "$1" = "3" || "$1" = "teleportare" ]]; then
test_teleportare
elif [[ "$1" = "4" || "$1" = "magazin" ]]; then
test_magazin
elif [[ "$1" = "cs" ]]; then
echo "skip running tests"
else
test_supercomputer
test_ferate
test_teleportare
test_magazin
fi
}
BONUS_TASK=magazin
# Please don't change this.
source "$(dirname "{0}")"/_utils/base_check.sh