| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 674255 | vjudge1 | Carnival (CEOI14_carnival) | C++17 | 10 ms | 324 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fi first
#define se second
#define pb push_back
#define pii pair<int, int>
#define pll pair<ll, ll>
const int mod=1e9+7, maxn=1e5+5;
int n, c[maxn], x, ki, ka, mid, res;
vector<int> v;
bool baru[maxn];
int main() {
ios_base::sync_with_stdio(false); cin.tie(NULL);
cin >> n;
v.pb(1);
c[1]=1;
for(int i=2; i<=n; i++) {
cout << v.size()+1 << ' ';
for(auto x:v) cout << x << ' ';
cout << i << endl;
cin >> x;
if(x>v.size()) baru[i]=true, v.pb(i), c[i]=v.size();
}
for(int i=2; i<=n; i++) {
if(baru[i]) continue;
ki=0, ka=v.size()-1;
while(ki<=ka) {
mid=(ki+ka)/2;
cout << mid+2 << ' ';
for(int i=0; i<=mid; i++) cout << v[i] << ' ';
cout << i << endl;
cin >> x;
if(x==mid+2) ki=mid+1;
else res=mid, ka=mid-1;
}
c[i]=c[v[res]];
}
cout << "0 ";
for(int i=1; i<=n; i++) cout << c[i] << ' ';
cout << endl;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | 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... | ||||
