| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1298417 | martin_011 | Cave (IOI13_cave) | C++20 | 104 ms | 504 KiB |
#include "cave.h"
#include <bits/stdc++.h>
using namespace std;
#define ll int
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define str string
#define vd void
#define vb vector<bool>
#define F first
#define S second
#define lbr '\n'
#define all(x) x.begin(), x.end()
const ll INF = 1E15;
void exploreCave(int n) {
int a[n], c[n];
for (int i=0; i<n; i++) {
a[i] = 0;
c[i]=-1;
}
ll p = tryCombination(a);
for (int i=0; i<n; i++) {
if (p==-1) p = n;
for (int j=0; j<n; j++) {
if (c[j] != -1) continue;
a[j] = 1;
ll aux = tryCombination(a);
if (aux==-1) aux = n;
if (p==i) {
if (aux > p) {
c[j] = i;
break;
}
} else if (p>i) {
if (aux==i) {
c[j]=i;
a[j]=0;
break;
}
}
a[j]=0;
}
p = tryCombination(a);
}
answer(a, c);
}
Compilation message (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... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
