| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1243690 | mathias_abadie | 동굴 (IOI13_cave) | C++20 | 1 ms | 328 KiB |
#include "cave.h"
#include <bits/stdc++.h>
using namespace std;
void exploreCave(int n) {
int s[n];
int d[n];
int finalS[n];
bool used[n];
fill(s, s + n, 0);
fill(used, used + n, false);
for (int puerta = 0; puerta < n; puerta++) {
int original = tryCombination(s);
for (int j = 0; j < n; j++) {
if (used[j]) continue;
s[j] ^= 1;
int nuevo = tryCombination(s);
s[j] ^= 1;
if (nuevo != original) {
d[j] = puerta;
finalS[j] = (nuevo == puerta) ? s[j] ^ 1 : s[j];
s[j] = finalS[j];
used[j] = true;
break;
}
}
}
answer(finalS, d);
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
