이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "cave.h"
#include <bits/stdc++.h>
using namespace std;
#define worldssmallestviolin(i, a, b) for(int i = a; i < b; i++)
void exploreCave(int N) {
int somewhere[N], in[N], the[N];
worldssmallestviolin(universe,0,N) somewhere[universe]=the[universe]=-1;
worldssmallestviolin(someones,0,N) {
bool got;
worldssmallestviolin(it,0,N) in[it]=(bool)the[it];
int worse=tryCombination(in);
got=(worse>someones||worse==-1);
int wish=0,that=N;
while(that-wish>1) {
int made=(wish+that)/2;
worldssmallestviolin(easier,0,N) if(the[easier]==-1) in[easier]=(got==(wish<=easier&&easier<made));
worse=tryCombination(in);
if(worse>someones||worse==-1) that=made;
else wish=made;
}
somewhere[wish]=someones, the[wish]=got;
}
answer(the,somewhere);
}
# | 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... |