# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
649918 |
2022-10-11T15:22:01 Z |
Pablo_No |
Cave (IOI13_cave) |
C++17 |
|
319 ms |
516 KB |
#include "cave.h"
const int N = 5005;
const int B = 13;
int q[N];
int cpos[N];
int ord[N];
void exploreCave(int N) {
for(int i = 0; i < N; i++)
{
cpos[i] = -1;
}
for(int i = 0; i < N; i++)
{
for(int j = 0; j < N; j++)
{
q[j] = 0;
if(cpos[j] != -1)
q[j] = cpos[j];
}
int an = tryCombination(q);
cpos[i] = 1;
if(an > i)
cpos[i] = 0;
int cp = cpos[i];
int idx = 0;
for(int k = 0; k < B; k++)
{
for(int j = 0; j < N; j++)
{
q[j] = 1-cp;
if(cpos[j] != -1)
q[j] = cpos[j];
else if((j & (1 << k)) && ((j | ((1 << k)-1)) == idx))
q[i] = cp;
}
int anx = tryCombination(q);
if(anx > i)
idx += (1 << k);
}
ord[i] = idx;
}
answer(cpos, ord);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
296 ms |
516 KB |
Answer is wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
319 ms |
412 KB |
Answer is wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Answer is wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Answer is wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
296 ms |
516 KB |
Answer is wrong |
2 |
Halted |
0 ms |
0 KB |
- |