Submission #639819

# Submission time Handle Problem Language Result Execution time Memory
639819 2022-09-11T21:37:06 Z magmag Prisoner Challenge (IOI22_prison) C++17
5 / 100
26 ms 19028 KB
#include "prison.h"

#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;

vector<vector<int>> devise_strategy(int n) {
    int x = n;
    vector<vi> ans(x+1, vi(n+1, 1));

    ans[0][0] = 0;
    for (int j = 1; j <= n; ++j)ans[0][j] = j;

    for (int i = 1; i <= x; ++i) {
        for (int j = 1; j <= n; ++j) {
            if (j <= i) {
                ans[i][j] = -2;
            } else ans[i][j] = -1;
        }
    }
    return ans;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 6 ms 644 KB Output is correct
4 Correct 7 ms 724 KB Output is correct
5 Correct 22 ms 2016 KB Output is correct
6 Correct 26 ms 2004 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 17 ms 1236 KB Output is correct
9 Correct 16 ms 1492 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Incorrect 0 ms 468 KB Wrong answer detected in grader
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Incorrect 12 ms 19028 KB Wrong answer detected in grader
5 Halted 0 ms 0 KB -