Submission #574748

#TimeUsernameProblemLanguageResultExecution timeMemory
574748RifalCarnival (CEOI14_carnival)C++14
20 / 100
108 ms280 KiB
#include <bits/stdc++.h> //#include <fstream> ///#define endl '\n' #define mod 10007 #define INF 100000000 #define ll long long //ofstream fout("split.out"); //ifstream fin("split.in"); //#define cin fin //#define cout fout using namespace std; int main() { ios_base::sync_with_stdio(0);cout.tie(0);cin.tie(0); int n; cin >> n; int ans[n+1] = {}; int cnt = 1; for(int i = 1; i <= n; i++) { if(ans[i] != 0) continue; ans[i] = cnt; cnt++; for(int j = i+1; j <= n; j++) { int x; cout << 2 << ' ' << i << ' ' << j << endl; cin >> x; if(x == 1) { ans[j] = ans[i]; } } } cout << 0 << ' '; for(int i = 1; i <= n; i++) { cout << ans[i] << ' '; } cout << endl; return 0; }
#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...