# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
507343 | amukkalir | Cave (IOI13_cave) | C++17 | 15 ms | 448 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "cave.h"
#include <bits/stdc++.h>
using namespace std;
int ud[5005];
void exploreCave(int N) {
int S[N], D[N];
for(int i=0; i<N; i++){
S[i] = 0;
D[i] = -1;
}
int rep = tryCombination(S);
while(rep != -1) {
for(int i=0; i<N; i++) {
if(ud[i]) continue; //alr asked
ud[i] = true;
S[i] ^= 1;
int nrep = tryCombination(S);
if(nrep == -1) {
rep = -1;
break;
}
else if(nrep < rep) {
S[i] ^= 1;
D[i] = nrep;
} else if(nrep > rep) {
D[i] = rep;
# | 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... |