Submission #574734

#TimeUsernameProblemLanguageResultExecution timeMemory
574734RealSnakeCarnival (CEOI14_carnival)C++14
20 / 100
96 ms256 KiB
#include "bits/stdc++.h" using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; #define ll long long #define mod 1000000007 int ans[151]; signed main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; int x = 1; for(int i = 1; i <= n; i++) { if(ans[i]) continue; ans[i] = x; for(int j = i + 1; j <= n; j++) { if(ans[j]) continue; cout << 2 << " " << i << " " << j << endl; int y; cin >> y; if(y == 1) ans[j] = x; } x++; } cout << 0 << " "; for(int i = 1; i <= n; i++) cout << ans[i] << " "; 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...