#include <bits/stdc++.h>
#include "cave.h"
using namespace std;
typedef long long ll;
int tryCombination(int S[]);
void answer(int S[] , int D[]);
void exploreCave(int n) {
int s[n];
fill(s, s+n, 0);
int d[n];
fill(d, d+n, -1);
while (true) {
int c=0;
for (int i=0; i<n; i++) {
if (d[i]!=-1) continue;
int a=tryCombination(s);
s[i]=!s[i];
int b=tryCombination(s);
if (b<a) {
d[i]=b;
s[i]=!s[i];
} else if (b>a) {
d[i]=b;
} else {
c++;
}
}
if (c==0) break;
}
answer(s, d);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
12 ms |
600 KB |
Answer is wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
too much calls on tryCombination() |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
too much calls on tryCombination() |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
too much calls on tryCombination() |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
12 ms |
600 KB |
Answer is wrong |
2 |
Halted |
0 ms |
0 KB |
- |