Submission #534627

#TimeUsernameProblemLanguageResultExecution timeMemory
534627YaserFaisalCarnival (CEOI14_carnival)C++17
20 / 100
99 ms296 KiB
#include <bits/stdc++.h> using namespace std ; #define int long long #define X first #define Y second #define F first #define S second //#define endl "\n" #define pii pair < int , int > int ans[155] ; int32_t main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n ; cin >> n ; int c = 0 ; for ( int i = 1 ; i <= n ; i++ ) { if ( ans[i] != 0 ) continue ; else { c++ ; ans[i] = c ; } for ( int j = i+1 ; j <= n ; j++ ) { if ( ans[j] != 0 ) continue; cout << 2 << " " << i << " " << j << endl ; int x ; cin >> x ; if ( x == 1 ) ans[j] = c ; } } for ( int i = 0 ; i <= n ; i++ ) cout << ans[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...