Submission #119251

# Submission time Handle Problem Language Result Execution time Memory
119251 2019-06-20T18:36:02 Z medk Carnival (CEOI14_carnival) C++14
0 / 100
3 ms 384 KB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n; cin>>n;
    set<int> st;
    vector<int> cst(151,1), pre(151,1);
    for(int i=2;i<=n;i++)
    {
        cout<<i<<" ";
        for(int j=1;j<=i;j++) cout<<j<<" ";
        cout<<endl;
        cin>>pre[i];
        if(pre[i]>pre[i-1]) cst[i]=pre[i];
        else
        {
            int l=1, r=i-1;
            while(l<r)
            {
                int mid=(l+r)/2;
                st.clear();
                cout<<mid-l+1<<" ";
                for(int j=l;j<=mid;j++)
                {
                    cout<<j<<" ";
                    st.insert(cst[j]);
                }
                cout<<i<<" "<<endl;
                int get; cin>>get;
                if(get==int(st.size()))
                    r=mid;
                else
                    l=mid+1;
            }
            cst[i]=pre[l];
        }
    }
    cout<<0<<" ";
    for(int i=1;i<=n;i++) cout<<cst[i]<<" ";
    cout<<endl;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Same person came twice to the party.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Same person came twice to the party.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Same person came twice to the party.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 384 KB Same person came twice to the party.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 384 KB Same person came twice to the party.
2 Halted 0 ms 0 KB -