# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
305863 | 2020-09-24T03:36:11 Z | juggernaut | 동굴 (IOI13_cave) | C++14 | 572 ms | 504 KB |
#include"cave.h" #include<bits/stdc++.h> using namespace std; int pos[5000],n,tmp[5000]; bool check(int val,int l,int r){ for(int i=0;i<n;i++)tmp[i]=(pos[i]||(l<=i&&i<=r))?1:0; int ret=tryCombination(tmp); if(ret==-1)ret=n; return ret>val; } void exploreCave(int N){ int i=0,l,r,m; n=N; for(;i<n;i++){ l=0,r=n-1; while(l<r){ int m=(l+r)>>1; if(check(i,l,m))r=m; else l=m+1; } pos[l]=i; } memset(tmp,0,sizeof(tmp)); answer(tmp,pos); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 248 ms | 504 KB | Answer is wrong |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 572 ms | 384 KB | Answer is wrong |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 384 KB | Output is correct |
2 | Incorrect | 1 ms | 384 KB | Answer is wrong |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 384 KB | Output is correct |
2 | Incorrect | 1 ms | 384 KB | Answer is wrong |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 248 ms | 504 KB | Answer is wrong |
2 | Halted | 0 ms | 0 KB | - |