# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
257169 | 2020-08-03T16:50:18 Z | a_player | Carnival (CEOI14_carnival) | C++14 | 2 ms | 384 KB |
#include <bits/stdc++.h> using namespace std; const int nax=150+5; int col[nax]; vector<int> dist; vector<int> sis; void ric(int l, int r, int val){ cout<<": "<<l<<" "<<r<<endl; if(l==r){ col[val-1]=l+1; return; } int m=(r+l)/2; cout<<m-l+2<<" "; for(int i=l;i<=m;i++)cout<<dist[i]<<" "; cout<<val<<endl; int h; cin>>h; if(h==m-l+2)ric(m+1,r,val); else ric(l,m,val); } int main(){ int N; cin>>N; dist.push_back(1); for(int i=2;i<=N;i++){ dist.push_back(i); cout<<dist.size()<<" "; for(int x:dist)cout<<x<<" "; cout<<endl; int h; cin>>h; if(h!=dist.size())dist.pop_back(),sis.push_back(i); } for(int i=0;i<dist.size();i++)col[dist[i]-1]=i+1; for(int x:sis)ric(0,dist.size()-1,x); cout<<"0 "; for(int i=0;i<N;i++)cout<<col[i]<<" "; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | Expected integer, but ":" found |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | Expected integer, but ":" found |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | Expected integer, but ":" found |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | Expected integer, but ":" found |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 384 KB | Expected integer, but ":" found |
2 | Halted | 0 ms | 0 KB | - |