#include<bits/stdc++.h>
#include "cave.h"
using namespace std;
typedef long long ll;
int cur=0;
void exploreCave(int n){
int s[n], d[n];
for(int &i: s) i=0;
while(cur<n){
int exp, mid, l=0, r=n-1;
while(l<r){
if(l==r){
d[l]=cur++;
break;
}
mid = (l+r)/2;
for(int i=l; i<=mid; s[i++]^=1);
exp = tryCombination(s);
if(exp>cur || exp==-1) r=mid;
else l=mid+1;
for(int i=l; i<=mid; s[i++]^=1);
}
}
answer(s,d);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
25 ms |
384 KB |
too much calls on tryCombination() |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
50 ms |
380 KB |
too much calls on tryCombination() |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
too much calls on tryCombination() |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
too much calls on tryCombination() |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
25 ms |
384 KB |
too much calls on tryCombination() |
2 |
Halted |
0 ms |
0 KB |
- |