답안 #639819

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
639819 2022-09-11T21:37:06 Z magmag 죄수들의 도전 (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;
}
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -