# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
26171 | ruhanhabib39 | Carnival (CEOI14_carnival) | C++14 | 16 ms | 2020 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int N;
vector<int> gp;
int res[150 + 10];
int query(vector<int> v) {
printf("%d", (int)v.size());
for(int i : v) {
printf(" %d", i);
}
printf("\n"); fflush(stdout);
int k; scanf("%d", &k);
return k;
}
int main() {
scanf("%d", &N);
gp.push_back(1);
for(int i = 2; i <= N; i++) {
gp.push_back(i);
if(query(gp) != gp.size()) {
gp.pop_back();
}
}
for(int i = 0; i < (int)gp.size(); i++) {
res[gp[i]] = i+1;
}
Compilation message (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... |