Submission #791009

#TimeUsernameProblemLanguageResultExecution timeMemory
7910090123xxCarnival (CEOI14_carnival)C++14
84 / 100
32 ms316 KiB
#include <bits/stdc++.h> using namespace std; int n, cur = 2, oldres, l, r, m; vector<int> v, a; vector<int> adj[155]; int ans[155], res[155]; bool tr[155]; int main(){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> n; oldres = 0; ans[1] = 1; for (int i = 1; i<= n; i++){ cout << i << " "; for (int j = 1; j<= i; j++){ cout << j; if (j < i) cout << " "; } cout << endl; cin >> res[i]; if (res[i] != res[i-1]){ ans[i] = cur; cur++; } } for (int i = 1; i<= n; i++){ if (tr[i] == true) continue; tr[i] = true; for (int j = i+1; j<= n; j++){ if (ans[j] > 0) continue; cout << "2 " << j << " " << i << endl; cin >> oldres; if (oldres == 1) ans[j] = ans[i]; } } cout << "0"; for (int i = 1; i<= n; i++) cout << " " << ans[i]-1; 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...