| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1216697 | giorgi123glm | Cave (IOI13_cave) | C++20 | 84 ms | 328 KiB |
#include "cave.h"
#include <complex.h>
#include <iostream>
#include <mutex>
#include <vector>
using namespace std;
void exploreCave(int N) {
vector <int> ans (N + 1);
vector <int> ans1 (N + 1);
vector <bool> locked (N + 1);
for (int i = 0; i < N; i++) {
int curres = tryCombination (ans.data());
if (curres == i) {
// try to find correct one
[&]()->void {
for (int j = 0; j < N; j++)
if (locked[j] == 0) {
ans[j] = 1;
int getres = tryCombination (ans.data());
if (getres > i) {
locked[j] = 1;
ans1[j] = i;
return;
} else
ans[j] = 0;
}
}();
} else {
// try to find incorrect one
for (int j = 0; j < N; j++)
if (locked[j] == 0) {
ans[j] = 1;
int getres = tryCombination (ans.data());
if (getres == i) {
locked[j] = 1;
ans[j] = 0;
ans1[j] = i;
break;
} else
ans[j] = 0;
}
}
}
answer (ans.data(), ans1.data());
}
| # | 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... | ||||
