Submission #574813

#TimeUsernameProblemLanguageResultExecution timeMemory
574813m_fenaisCarnival (CEOI14_carnival)C++17
20 / 100
95 ms320 KiB
#include <bits/stdc++.h> //#define endl '\n' #define mk make_pair #define FAST ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) typedef long long ll; using namespace std; const int N = 1e6 + 10; const int mod = 1e9 + 7; map<int, int> mp; int main() { FAST; int n; cin>>n; int cnt = 1; for(int i=1; i<=n; i++) { if(mp[i] == 0) { mp[i] = cnt; cnt++; for(int j=i+1; j<=n; j++) { cout<<2<<' '<<i<<' '<<j<<endl; int x; cin>>x; if(x == 1) mp[j] = mp[i]; } } } cout<<0<<' '; for(int i=1; i<=n; i++) { cout<<mp[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...