# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
220873 | 2020-04-09T07:00:41 Z | LorenaMaria | 사육제 (CEOI14_carnival) | C++14 | 13 ms | 384 KB |
#include <bits/stdc++.h> using namespace std; int n,p[152],x; vector <int> u; int main() { cin>>n; p[1]=1; u.push_back(1); for(int i=2;i<=n;i++) { cout<<u.size()+1<<" "; for(int j=0;j<u.size();j++) cout<<u[j]<<" "; cout<<i<<'\n'; cin>>x; if(x==u.size()+1) p[i]=x,u.push_back(i); } for(int i=1;i<=n;i++) { if(p[i]) continue; int st=0,dr=u.size()-1; while(st<=dr) { int m=(st+dr)/2; cout<<m-st+2<<" "; for(int j=st;j<=m;j++) cout<<u[j]<<" "; cout<<i<<'\n'; cin>>x; if(x==m-st+1) dr=m-1; else st=m+1; } p[i]=p[u[st]]; } cout<<"0 "; for(int i=1;i<=n;i++) cout<<p[i]<<" "; cout<<'\n'; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 8 ms | 256 KB | Output is correct |
2 | Correct | 9 ms | 256 KB | Output is correct |
3 | Correct | 9 ms | 256 KB | Output is correct |
4 | Correct | 7 ms | 256 KB | Output is correct |
5 | Correct | 7 ms | 384 KB | Output is correct |
6 | Correct | 7 ms | 256 KB | Output is correct |
7 | Correct | 11 ms | 384 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 9 ms | 256 KB | Output is correct |
2 | Correct | 13 ms | 384 KB | Output is correct |
3 | Correct | 8 ms | 384 KB | Output is correct |
4 | Correct | 8 ms | 256 KB | Output is correct |
5 | Correct | 10 ms | 256 KB | Output is correct |
6 | Correct | 10 ms | 256 KB | Output is correct |
7 | Correct | 10 ms | 256 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 7 ms | 384 KB | Output is correct |
2 | Correct | 10 ms | 384 KB | Output is correct |
3 | Correct | 11 ms | 384 KB | Output is correct |
4 | Correct | 7 ms | 256 KB | Output is correct |
5 | Correct | 13 ms | 256 KB | Output is correct |
6 | Correct | 11 ms | 384 KB | Output is correct |
7 | Correct | 12 ms | 256 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 9 ms | 384 KB | Output is correct |
2 | Correct | 8 ms | 384 KB | Output is correct |
3 | Correct | 9 ms | 256 KB | Output is correct |
4 | Correct | 7 ms | 256 KB | Output is correct |
5 | Correct | 11 ms | 384 KB | Output is correct |
6 | Correct | 10 ms | 256 KB | Output is correct |
7 | Correct | 12 ms | 384 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 9 ms | 256 KB | Output is correct |
2 | Correct | 9 ms | 256 KB | Output is correct |
3 | Correct | 11 ms | 384 KB | Output is correct |
4 | Correct | 10 ms | 384 KB | Output is correct |
5 | Correct | 11 ms | 256 KB | Output is correct |
6 | Correct | 9 ms | 256 KB | Output is correct |
7 | Correct | 7 ms | 384 KB | Output is correct |