# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
50713 |
2018-06-13T05:00:17 Z |
zetapi |
Cave (IOI13_cave) |
C++14 |
|
26 ms |
640 KB |
#include "cave.h"
#include "bits/stdc++.h"
using namespace std;
#define pb push_back
#define mp make_pair
const int MAX=1e5;
void exploreCave(int N)
{
/* ... */
vector<int> vec;
int cur,lol,shi[MAX],pos[MAX];
for(int A=0;A<N;A++)
{
shi[A]=0;
pos[A]=0;
vec.pb(A);
}
for(int A=0;A<N;A++)
{
cur=tryCombination(shi);
if(cur==-1)
{
for(auto B:vec)
{
shi[B]=1;
pos[B]=tryCombination(shi);
shi[B]=0;
}
answer(shi,pos);
return ;
}
for(auto B:vec)
{
shi[B]=1;
lol=tryCombination(shi);
if(lol>cur or lol==-1)
{
shi[B]=1;
pos[B]=cur;
vec.erase(lower_bound(vec.begin(),vec.end(),A));
break;
}
shi[B]=0;
}
}
answer(shi,pos);
return ;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
8 ms |
512 KB |
too much calls on tryCombination() |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
23 ms |
564 KB |
Output is correct |
2 |
Correct |
6 ms |
384 KB |
Output is correct |
3 |
Correct |
20 ms |
524 KB |
Output is correct |
4 |
Correct |
5 ms |
332 KB |
Output is correct |
5 |
Correct |
6 ms |
384 KB |
Output is correct |
6 |
Correct |
23 ms |
640 KB |
Output is correct |
7 |
Correct |
21 ms |
512 KB |
Output is correct |
8 |
Correct |
24 ms |
512 KB |
Output is correct |
9 |
Correct |
26 ms |
512 KB |
Output is correct |
10 |
Correct |
19 ms |
640 KB |
Output is correct |
11 |
Correct |
23 ms |
512 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
384 KB |
Output is correct |
2 |
Correct |
5 ms |
384 KB |
Output is correct |
3 |
Correct |
5 ms |
384 KB |
Output is correct |
4 |
Correct |
5 ms |
512 KB |
Output is correct |
5 |
Incorrect |
6 ms |
384 KB |
Answer is wrong |
6 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
384 KB |
Output is correct |
2 |
Correct |
5 ms |
384 KB |
Output is correct |
3 |
Correct |
5 ms |
384 KB |
Output is correct |
4 |
Correct |
5 ms |
512 KB |
Output is correct |
5 |
Incorrect |
6 ms |
384 KB |
Answer is wrong |
6 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
8 ms |
512 KB |
too much calls on tryCombination() |
2 |
Halted |
0 ms |
0 KB |
- |