# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1023115 | vjudge1 | 죄수들의 도전 (IOI22_prison) | C++17 | 10 ms | 1116 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
std::vector<std::vector<int>> devise_strategy(int N){
vector<vector<int>> s(27, vector<int>(N + 1, 0));
for(int x = 0; x < s.size(); x++){
if(!x){
s[x][0] = 0;
for(int i = 1; i <= N; i++){
s[x][i] = 25;
if(i & (1<<12)) s[x][i]++;
}
} else{
int k = (x - 1) / 2;
s[x][0] = 1 - (k & 1);
for(int i = 1; i <= N; i++){
bool c = 0;
if(i & (1<<k)) c = 1;
if(((x - 1) & 1) < c){
s[x][i] = - (s[x][0] ^ 1) - 1;
}
else if(((x - 1) & 1) > c){
s[x][i] = - s[x][0] - 1;
}
else{
s[x][i] = (k - 1) * 2 + 1;
if(i & (1<<(k-1))) s[x][i]++;
// cout << x << ' ' << k << ' ' << i << ' ' << bool(i & (1<<(k-1))) << s[x][i] << endl;
}
}
}
// cout << x << ' ' << s[x][0] << endl;
}
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... |