# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
172676 | 2020-01-02T10:46:15 Z | nafis_shifat | Carnival (CEOI14_carnival) | C++14 | 17 ms | 380 KB |
#include<bits/stdc++.h> #define pii pair<int,int> #define ll long long using namespace std; const int mxn=160; int main() { int n; cin>>n; cout<<n<<" "; for(int i=1;i<=n;i++)cout<<i<<" "; cout<<endl; int lst; cin>>lst; vector<int> baps; int dn[mxn]={}; for(int i=n-1;i>0;i--) { cout<<i<<" "; for(int j=1;j<=i;j++)cout<<j<<" "; cout<<endl; int t; cin>>t; if(t!=lst) { t=lst; baps.push_back(i+1); dn[i+1]=1; } } vector<int> p[mxn]; for(int i=0;i<baps.size();i++) { for(int j=1;j<=n;j++) { if(dn[j]==0) { cout<<"2 "<<baps[i]<<" "<<j<<endl; int k; cin>>k; if(k==1) { p[baps[i]].push_back(j); dn[j]=1; } } } } int res[mxn]; for(int i=0;i<baps.size();i++) { res[baps[i]]=i+1; for(int j=0;j<p[baps[i]].size();j++) { res[p[baps[i]][j]]=i+1; } } cout<<"0 "; for(int i=1;i<=n;i++)cout<<res[i]<<" "; cout<<endl; return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 17 ms | 248 KB | Integer 18 violates the range [1, 11] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 9 ms | 380 KB | Integer 0 violates the range [1, 5] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 248 KB | Integer 0 violates the range [1, 1] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 9 ms | 248 KB | Output is correct |
2 | Incorrect | 11 ms | 248 KB | Integer 0 violates the range [1, 6] |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 376 KB | Integer 0 violates the range [1, 2] |
2 | Halted | 0 ms | 0 KB | - |