답안 #220679

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
220679 2020-04-08T11:30:01 Z LorenaMaria 사육제 (CEOI14_carnival) C++14
40 / 100
14 ms 384 KB
#include <bits/stdc++.h>
using namespace std;
int n,p[151],x,k;
vector <int> u;
int main()
{ cin>>n;
  p[1]=++k;
  u.push_back(1);
  for(int i=2;i<=n;i++)
  { cout<<i<<" ";
    for(int j=1;j<=i;j++)
      cout<<j<<" ";
    cout<<'\n';
    int c;
    cin>>c;
    if(x!=c)
       p[i]=++k,u.push_back(i);
    x=c;
  }
  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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 256 KB Output is correct
2 Correct 11 ms 256 KB Output is correct
3 Correct 9 ms 384 KB Output is correct
4 Correct 7 ms 384 KB Output is correct
5 Incorrect 8 ms 256 KB Integer 0 violates the range [1, 3]
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 384 KB Output is correct
2 Correct 12 ms 384 KB Output is correct
3 Correct 9 ms 384 KB Output is correct
4 Correct 7 ms 256 KB Output is correct
5 Correct 11 ms 384 KB Output is correct
6 Incorrect 14 ms 256 KB Integer 0 violates the range [1, 15]
7 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 7 ms 384 KB Integer 2 violates the range [1, 1]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 256 KB Output is correct
2 Correct 11 ms 256 KB Output is correct
3 Correct 9 ms 384 KB Output is correct
4 Correct 7 ms 384 KB Output is correct
5 Correct 11 ms 256 KB Output is correct
6 Correct 11 ms 256 KB Output is correct
7 Correct 13 ms 384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 9 ms 256 KB Output is correct
2 Correct 12 ms 384 KB Output is correct
3 Correct 11 ms 256 KB Output is correct
4 Correct 10 ms 256 KB Output is correct
5 Correct 13 ms 384 KB Output is correct
6 Correct 9 ms 256 KB Output is correct
7 Correct 7 ms 256 KB Output is correct