| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1252103 | rayan_bd | 사육제 (CEOI14_carnival) | C++20 | 25 ms | 408 KiB |
#include <bits/stdc++.h>
using namespace std;
int main(){
int n, id = 1;
cin >> n;
vector<int> ans(n + 1, -1);
auto ask = [&](int i, int j){
int res = 0;
cout << "2 " << i << " " << j << endl;
cin >> res;
return res;
};
for(int i = 1; i <= n; ++i){
if(ans[i] != -1) continue;
ans[i] = id;
for(int j = i + 1; j <= n; ++j){
if(ask(i, j) == 1){
ans[j] = id;
}
}
id += 1;
}
cout << "0 ";
for(int i = 1; i <= n; ++i) cout << ans[i] << " ";
return 0;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
