# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
64387 | 2018-08-04T09:21:39 Z | FedericoS | 사육제 (CEOI14_carnival) | C++14 | 3 ms | 808 KB |
#include <iostream> #include <vector> #include <utility> using namespace std; int N; vector<int> V; int res; int C[105]; bool check(int i, int l, int m){ cout<<m-l+2<<" "; for(int j=l;j<m+1;j++) cout<<V[j]<<" "; cout<<i<<endl; cin>>res; return res==m-l+1; } int main(){ cin>>N; for(int i=0;i<N;i++) C[i]=-1; for(int i=0;i<N;i++){ cout<<V.size()+1<<" "; for(int x:V) cout<<x<<" "; cout<<i<<endl; cin>>res; if(res==V.size()+1){ V.push_back(i); C[i]=V.size()-1; } } for(int i=0;i<N;i++) if(C[i]==-1){ int l=0,r=V.size(),m; while(l<r){ m=(l+r)/2; if(check(i,l,m)) r=m; else l=m+1; } C[i]=l; } cout<<0<<" "; for(int i=0;i<N;i++) cout<<C[i]<<" "; cout<<endl; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 376 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 628 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 640 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 736 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 808 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |