Submission #1229538

#TimeUsernameProblemLanguageResultExecution timeMemory
1229538kaltspielerhyPrisoner Challenge (IOI22_prison)C++20
0 / 100
0 ms324 KiB
#include <bits/stdc++.h>
using namespace std;

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

    s[0][0] = 0;
    for (int A = 1; A <= N; A++) {
        s[0][A] = A;
    }

    for (int A = 1; A <= N; A++) {
        s[A][0] = 1;
        int B = 1;
        while (A > B) {
            s[A][B] = -1;
            B++;
        }
        while (B <= N) {
            s[A][B] = -2;
            B++;
        }
    }

    return s;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...