This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |