| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1321215 | mirasm | 죄수들의 도전 (IOI22_prison) | C++20 | 10 ms | 1700 KiB |
#include "prison.h"
#include<bits/stdc++.h>
using namespace std;
vector<vector<int>> devise_strategy(int n) {
vector<vector<int>> ans(39, vector<int>(n + 1));
for (int i = 0, go = 13; i <= 12; go += 2, i++) {
ans[i][0] = 0;
for (int j = 1; j <= n; j++) {
ans[i][j] = go + (j >> (12 - i) & 1);
}
}
for (int i = 13, bit = 12; i < 39; bit--, i += 2) {
ans[i][0] = 1;
ans[i + 1][0] = 1;
for (int j = 1; j <= n; j++) {
if (j >> bit & 1) {
ans[i][j] = -1;
ans[i + 1][j] = (12 - bit) + 1;
}
else {
ans[i][j] = (12 - bit) + 1;
ans[i + 1][j] = -2;
}
}
}
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
