| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1337720 | kawhiet | 사육제 (CEOI14_carnival) | C++20 | 2 ms | 436 KiB |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
// auto ask = [&](vector<int> k) {
// cout << k.size();
// for (auto i : k) {
// cout << ' ' << i + 1;
// }
// cout << endl;
// int ret;
// cin >> ret;
// return ret;
// };
vector<int> ans(n, -1);
int c = 1;
for (int i = 0; i < n; i++) {
if (ans[i] != -1) {
continue;
}
ans[i] = c;
for (int j = i + 1; j < n; j++) {
if (ans[j] == -1) {
cout << "2 " << i + 1 << ' ' << j + 1 << endl;
int ret;
cin >> ret;
if (ret == 1) {
ans[j] = c;
}
}
}
c++;
}
for (int i = 0; i < n; i++) {
cout << ans[i] << ' ';
}
cout << '\n';
return 0;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
