Submission #574803

#TimeUsernameProblemLanguageResultExecution timeMemory
574803MajidCarnival (CEOI14_carnival)C++17
20 / 100
104 ms208 KiB
#include<bits/stdc++.h> using namespace std; using ll = long long; using db = double; #define pb push_back #define sz(vec) ((ll)vec.size()) #define all(vec) vec.begin(), vec.end() #define f first #define s second const int MOD = 1e9 + 7; const ll BIGINF = ((ll)1e18) + 7; #define Speeed ios::sync_with_stdio(0);cin.tie(NULL); cout.tie(NULL); int main(){ ll n, col = 1; cin>>n; vector<ll> ans(n+1); set<ll> sett; for(ll i = 1; i <= n; i++){ if(!ans[i]){ ans[i] = col; col++; } else continue; for(ll j = i+1; j <= n; j++){ cout<<"2 "<<i<<" "<<j<<endl; ll x; cin>>x; if(x==1)ans[j] = ans[i]; } } cout<<"0 "; for(ll i = 1; i <= n; i++)cout<<ans[i]<<" "; cout<<endl; return 0; // 1 3 1 }
#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...