# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
155640 | 2019-09-29T13:33:58 Z | Akashi | 사육제 (CEOI14_carnival) | C++14 | 26 ms | 404 KB |
#include <bits/stdc++.h> using namespace std; int n; vector <int> v; int a[155]; bool f[155]; int main() { mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); cin >> n; int NR = 0, x; a[1] = ++NR; v.push_back(1); for(int i = 2; i <= n ; ++i){ cout << v.size() + 1 << " "; for(auto it : v) cout << it << " "; cout << i; cout << endl; cin >> x; if(x == NR){ memset(f, 0, sizeof(f)); shuffle(v.begin(), v.end(), rng); for(int p = 0; p < v.size() ; ++p){ int it = v[p]; if(p == v.size() - 1){ a[i] = a[it]; break ; } cout << 2 << " "; cout << i << " " << it << endl; cin >> x; if(x == 1){ a[i] = a[it]; break ; } } } else{ v.push_back(i); a[i] = ++NR; } } cout << 0 << " "; for(int i = 1; i <= n ; ++i) cout << a[i] << " "; cout << endl; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 11 ms | 376 KB | Output is correct |
2 | Correct | 22 ms | 248 KB | Output is correct |
3 | Correct | 21 ms | 248 KB | Output is correct |
4 | Correct | 8 ms | 248 KB | Output is correct |
5 | Correct | 6 ms | 248 KB | Output is correct |
6 | Correct | 5 ms | 248 KB | Output is correct |
7 | Correct | 18 ms | 248 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 7 ms | 376 KB | Output is correct |
2 | Correct | 12 ms | 248 KB | Output is correct |
3 | Correct | 11 ms | 376 KB | Output is correct |
4 | Correct | 9 ms | 376 KB | Output is correct |
5 | Correct | 10 ms | 252 KB | Output is correct |
6 | Correct | 12 ms | 380 KB | Output is correct |
7 | Correct | 10 ms | 376 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 300 KB | Output is correct |
2 | Correct | 11 ms | 376 KB | Output is correct |
3 | Correct | 23 ms | 404 KB | Output is correct |
4 | Correct | 6 ms | 376 KB | Output is correct |
5 | Correct | 13 ms | 296 KB | Output is correct |
6 | Correct | 17 ms | 376 KB | Output is correct |
7 | Correct | 20 ms | 376 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 376 KB | Output is correct |
2 | Correct | 7 ms | 376 KB | Output is correct |
3 | Correct | 20 ms | 248 KB | Output is correct |
4 | Correct | 7 ms | 248 KB | Output is correct |
5 | Correct | 12 ms | 248 KB | Output is correct |
6 | Correct | 17 ms | 300 KB | Output is correct |
7 | Correct | 16 ms | 376 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 376 KB | Output is correct |
2 | Correct | 16 ms | 248 KB | Output is correct |
3 | Correct | 26 ms | 376 KB | Output is correct |
4 | Correct | 20 ms | 328 KB | Output is correct |
5 | Correct | 19 ms | 380 KB | Output is correct |
6 | Correct | 11 ms | 376 KB | Output is correct |
7 | Correct | 7 ms | 312 KB | Output is correct |