# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
596447 | 2022-07-14T18:45:10 Z | daisy2 | 사육제 (CEOI14_carnival) | C++14 | 11 ms | 216 KB |
#include<iostream> using namespace std; int n,m[300],num=0,a,l,r,mid,re[300]; int main() { cin>>n; m[1]=1;num=1;re[1]=1; for(int i=2;i<=n;i++) { cout<<num+1<<" "<<i<<" "; for(int j=1;j<=num;j++) cout<<m[j]<<" ";cout<<endl; cin>>a; if(a==num+1) { num++;m[num]=i;re[i]=num; continue; } l=1;r=num; while(l<=r) { mid=(l+r)/2; cout<<mid+1<<" "<<i<<" "; for(int j=1;j<=mid;j++) cout<<m[j]<<" ";cout<<endl; cin>>a; if(a==mid+1) l=mid+1; else r=mid-1; } re[i]=l; } cout<<0<<" "; for(int i=1;i<=n;i++) cout<<re[i]<<" "; cout<<endl; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 208 KB | Output is correct |
2 | Correct | 8 ms | 208 KB | Output is correct |
3 | Correct | 6 ms | 208 KB | Output is correct |
4 | Correct | 2 ms | 208 KB | Output is correct |
5 | Correct | 3 ms | 208 KB | Output is correct |
6 | Correct | 2 ms | 208 KB | Output is correct |
7 | Correct | 6 ms | 208 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 208 KB | Output is correct |
2 | Correct | 7 ms | 208 KB | Output is correct |
3 | Correct | 3 ms | 208 KB | Output is correct |
4 | Correct | 4 ms | 208 KB | Output is correct |
5 | Correct | 6 ms | 208 KB | Output is correct |
6 | Correct | 5 ms | 208 KB | Output is correct |
7 | Correct | 6 ms | 208 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 208 KB | Output is correct |
2 | Correct | 6 ms | 208 KB | Output is correct |
3 | Correct | 9 ms | 208 KB | Output is correct |
4 | Correct | 3 ms | 208 KB | Output is correct |
5 | Correct | 6 ms | 208 KB | Output is correct |
6 | Correct | 7 ms | 208 KB | Output is correct |
7 | Correct | 8 ms | 208 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 208 KB | Output is correct |
2 | Correct | 6 ms | 208 KB | Output is correct |
3 | Correct | 5 ms | 208 KB | Output is correct |
4 | Correct | 3 ms | 208 KB | Output is correct |
5 | Correct | 7 ms | 208 KB | Output is correct |
6 | Correct | 6 ms | 208 KB | Output is correct |
7 | Correct | 11 ms | 216 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 208 KB | Output is correct |
2 | Correct | 9 ms | 208 KB | Output is correct |
3 | Correct | 6 ms | 208 KB | Output is correct |
4 | Correct | 10 ms | 208 KB | Output is correct |
5 | Correct | 6 ms | 208 KB | Output is correct |
6 | Correct | 7 ms | 208 KB | Output is correct |
7 | Correct | 4 ms | 208 KB | Output is correct |