제출 #1067505

#제출 시각아이디문제언어결과실행 시간메모리
1067505jsannemo사육제 (CEOI14_carnival)C++14
20 / 100
60 ms596 KiB
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; int main() { cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit); int N; cin >> N; vi col(N); int C = 1; rep(i,0,N) { col[i] = C; rep(j,0,i) { cout << 2 << " " << (i + 1) << " " << (j + 1) << endl; int num; cin >> num; if (num == 1) { col[i] = col[j]; break; } } if (col[i] == C) ++C; } cout << 0; rep(i,0,N) cout << " " << col[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...