| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1351109 | cpismayilmmdv985 | 동굴 (IOI13_cave) | C++20 | 104 ms | 492 KiB |
#include "cave.h"
#include "bits/stdc++.h"
using namespace std;
void exploreCave(int N) {
int S[N], D[N];
for (int i = 0; i < N; i++) S[i] = 0, D[i] = -1;
while (true) {
bool flag = true;
for (int i = 0; i < N; i++) if (D[i] == -1) {
flag = false;
break;
}
if (flag) break;
int curr = tryCombination(S);
// cerr << curr << '\n';
// for (int i = 0; i < N; i++) cerr << S[i] << ' ';
// cerr << '\n';
// for (int i = 0; i < N; i++) cerr << D[i] << ' ';
// cerr << '\n';
for (int i = 0; i < N; i++) {
if (D[i] != -1) continue;
S[i] = 1;
int X = tryCombination(S);
if (X == -1) D[i] = curr;
else {
if (X > curr) D[i] = curr, curr = X;
else if (X < curr) D[i] = X, S[i] = 0;
else S[i] = 0;
}
}
}
answer(S, 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... | ||||
