Submission #220687

# Submission time Handle Problem Language Result Execution time Memory
220687 2020-04-08T11:37:54 Z LorenaMaria Carnival (CEOI14_carnival) C++14
0 / 100
12 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,r=0;
    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,r=m;
    }
    p[i]=p[u[r]];
  }
  cout<<"0 ";
  for(int i=1;i<=n;i++)
    cout<<p[i]<<" ";
  cout<<'\n';
  return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 12 ms 256 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 384 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 9 ms 256 KB Integer 2 violates the range [1, 1]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 256 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 9 ms 256 KB Incorrect
2 Halted 0 ms 0 KB -