# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1023001 | vjudge1 | 죄수들의 도전 (IOI22_prison) | C++17 | 1 ms | 348 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
std::vector<std::vector<int>> devise_strategy(int N){
vector<vector<int>> s(10 * 3, vector<int>(N + 1, 0));
for(int x = 0; x < s.size(); x++){
int k = 9 - x / 3;
if(x % 3 == 0){
s[x][0] = 0;
for(int i = 1; i <= N; i++){
s[x][i] = x + 1;
if(i & (1<<k)) s[x][i]++;
}
} else{
s[x][0] = 1;
for(int i = 1; i <= N; i++){
bool c = i & (1<<k);
if(k){
if(x%3 - 1 > c) s[x][i] = -2;
else if(x % 3 < c) s[x][i] = -1;
else s[x][i] = (x / 3 + 1) * 3;
} else{
if(x%3 - 1 > c) s[x][i] = -2;
else s[x][i] = -1;
}
}
}
}
return s;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |