# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
972094 |
2024-04-30T04:50:39 Z |
tamir1 |
Cave (IOI13_cave) |
C++17 |
|
2000 ms |
348 KB |
#include "cave.h"
#include<iostream>
using namespace std;
int S[5000],D[5000];
void exploreCave(int N) {
while(true){
}
int i;
if(N<=100){
while(tryCombination(S)!=-1){
int x=tryCombination(S);
for(i=0;i<N;i++){
//if(S[i]==1) continue;
S[i]=1-S[i];
int y=tryCombination(S);
if(y==-1) break;
if(y<x) S[i]=1-S[i];
}
}
}
if(tryCombination(S)==-1){
for(i=0;i<N;i++){
S[i]=1-S[i];
int x=tryCombination(S);
S[i]=1-S[i];
D[i]=x;
}
answer(S,D);
}
for(i=0;i<N;i++) D[i]=i;
for(i=0;i<N;i++){
int x=tryCombination(S);
if(x==-1) break;
S[x]=1;
}
answer(S,D);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2015 ms |
344 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2011 ms |
348 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2019 ms |
344 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2019 ms |
344 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2015 ms |
344 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |