# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1155086 | AlgorithmWarrior | Carnival (CEOI14_carnival) | C++20 | 3 ms | 412 KiB |
#include <bits/stdc++.h>
using namespace std;
int const MAX=155;
vector<int>grp[MAX];
int n;
int costume[MAX];
int main()
{
cin>>n;
grp[1].push_back(1);
int i,j;
int cnt=1;
for(i=2;i<=n;++i){
cout<<cnt+1<<' ';
for(j=1;j<=cnt;++j)
cout<<grp[j].back()<<' ';
cout<<i<<endl;
int nr;
cin>>nr;
if(nr==cnt+1){
++cnt;
grp[cnt].push_back(i);
}
else{
/// (]
int st=0,dr=cnt;
while(dr-st>1){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |