이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "cave.h"
#include <bits/stdc++.h>
#define ld double
#define ll int
#define ull unsigned long long
#define llinf 100000000000000000LL // 10^17
#define iinf 2000000000 // 2*10^9
#define pb push_back
#define popb pop_back
#define fi first
#define sc second
#define endl '\n'
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pld pair<ld,ld>
#define sz(a) int(a.size())
#define all(a) a.begin(),a.end()
#define ceri(a,l,r) {for(ll i_ = l;i_<=r;i_++) cerr<<a[i_]<< " ";cerr<<endl;}
using namespace std;
#define maxn 5005
ll n;
ll a[maxn];
ll b[maxn];
ll c[maxn];
void exploreCave(int N) {
n = N;
for(ll i = 0;i<n;i++) b[i] = -1;
for(ll i = 0;i<n;i++) c[i] = 0;
if(tryCombination(c)==-1){
for(ll i = 0;i<n;i++){
c[i] = 1;
int e = tryCombination(c);
b[i] = e;
c[i] = 0;
}
answer(c,b);
}
iota(a,a+n,0);
for(ll i = 0;i<n;i++){
c[i] = 1;
ll e = tryCombination(c);
if(e==-1) e = n;
if(e>i) c[i] = 1;
else c[i] = 0;
}
answer(c,a);
}
# | 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... |