#include <vector>
std::vector<std::vector<int>> devise_strategy(int N) {
std::vector<std::vector<int>> s(N + 1, std::vector<int>(N + 1, -2));
for (int i = 0; i <= N; i++) {
for (int j = 1; j <= N; j++) {
if (i == 0) {
s[i][j] = -2;
} else if (j == 1) {
s[i][j] = -1;
} else if (j > i) {
s[i][j] = i;
} else {
s[i][j] = -2;
}
}
s[i][0] = 0;
}
s.push_back(s[0]);
s.back()[0] = 1;
return s;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
284 KB |
Strategy failed for N=2, A=1, B=2 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Strategy failed for N=2, A=1, B=2 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
288 KB |
Strategy failed for N=3, A=1, B=2 |
2 |
Halted |
0 ms |
0 KB |
- |