Submission #930293

#TimeUsernameProblemLanguageResultExecution timeMemory
930293ByeWorldCarnival (CEOI14_carnival)C++14
20 / 100
51 ms344 KiB
#include <bits/stdc++.h> #define fi first #define se second #define pb push_back //#define int long long #define lf (id<<1) #define rg ((id<<1)|1) #define md ((l+r)>>1) using namespace std; typedef pair<int,int> pii; typedef pair<pii,int> ipii; const int INF = 1e9+10; const int MAXN = 1e6+10; int n; int a[200], cnt; signed main() { cin >> n; for(int i=1; i<=n; i++){ if(a[i] != 0) continue; a[i] = ++cnt; for(int j=i+1; j<=n; j++){ if(a[j] != 0) continue; cout << "2 " << i << ' ' << j << endl; int te; cin >> te; if(te == 1){ a[j] = cnt; } } } cout << "0 "; for(int i=1; i<=n; i++) cout << a[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...