Submission #568638

#TimeUsernameProblemLanguageResultExecution timeMemory
568638beaconmcCarnival (CEOI14_carnival)C++14
0 / 100
9 ms428 KiB
#include <bits/stdc++.h> typedef long long ll; #define FOR(i,x,y) for(ll i=x; i<y; i++) #define FORNEG(i,x,y) for(ll i=x; i>y; i--) using namespace std; int main(){ ll n; cin >> n; ll c; cout<< n << " "; FOR(i,1,n+1) cout << i << " " ; cout << endl; cin >> c; vector<vector<ll>> tings(c); set<ll> sussy; ll prev = c; FORNEG(i,n-1,0){ ll sus = 0; cout << i << " "; FOR(j,1,i+1){ cout << j << " "; } cout << endl; cin >> sus; if (sus != prev){ sussy.insert(i); tings[c-prev].push_back(i); prev = sus; } } FOR(i,0,c){ FOR(j,1,n+1){ if (!sussy.count(j)){ cout << 2 << " " << tings[i][0] << " " << j << endl; ll realsus; cin >> realsus; if (realsus==1){ tings[i].push_back(j); sussy.insert(j); } } } } vector<ll> ans(n); FOR(i,0,c){ for (auto&j : tings[i]){ ans[j-1] = i+1; } } cout << 0 << " "; for (auto&i : ans){ cout << i << " "; } cout << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...