Submission #740544

# Submission time Handle Problem Language Result Execution time Memory
740544 2023-05-12T16:59:22 Z ALVIN Prisoner Challenge (IOI22_prison) C++17
0 / 100
0 ms 212 KB
#include <vector>

std::vector<std::vector<int>> devise_strategy(int N) {
    std::vector<std::vector<int>> s(N + 1, std::vector<int>(N + 1, 0));

    for (int i = 0; i <= N; i++) {
        for (int j = 0; j <= N; j++) {
            if (i == 0 || j == 0) {
                s[i][j] = 0;
            } else if (i == 1 && j == 1) {
                s[i][j] = -1;
            } else if (i > 1 && j == 1) {
                s[i][j] = -2;
            } else if (i == j) {
                s[i][j] = 1;
            } else {
                s[i][j] = i - 1;
            }
        }
    }

    return s;
}
# 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 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 0 ms 212 KB Strategy failed for N=3, A=1, B=2
2 Halted 0 ms 0 KB -