This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "cave.h"
using namespace std;
#define all(x) (x).begin(), (x).end()
#define ll long long int
#define pii pair <int, int>
#define pb push_back
#define ff first
#define ss second
void exploreCave(int n){
int S[n], D[n];
for (int i = 0; i < n; i++){
S[i] = 0;
D[i] = i;
}
int x = tryCombination(S);
if (x == -1){
for (int i = 0; i < n; i++){
S[i] = 1;
D[i] = tryCombination(S);
S[i] = 0;
}
answer(S, D);
}else{
while(1){
int j = tryCombination(S);
if (j == -1){
answer(S, D);
return;
}
S[j] = !S[j];
}
}
}
// int main ()
// {
// ios::sync_with_stdio(false);
// cin.tie(0);
// cin >> t;
// while (t--){
// }
// }
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |