#include<bits/stdc++.h>
#include"library.h"
#ifdef EVAL
#else
#include"grader.cpp"
#endif
using namespace std;
vector<int>g[205],ans;
void dfs(int v,int p){
ans.push_back(v+1);
for(int to:g[v])if(to!=p)dfs(to,v);
}
void Solve(int n){
vector<int>m(n,0);
for(int i=0;i+1<n;i++){
for(int j=i+1;j<n;j++){
m[i]=m[j]=1;
if(Query(m)==1){
g[i].push_back(j);
g[j].push_back(i);
}
m[i]=m[j]=0;
}
}
int root=0;
for(int i=0;i<n;i++)if(g[i].size()==1)root=i;
dfs(root,root);
Answer(ans);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
327 ms |
364 KB |
# of queries: 18336 |
2 |
Correct |
239 ms |
748 KB |
# of queries: 18145 |
3 |
Correct |
299 ms |
620 KB |
# of queries: 19900 |
4 |
Correct |
279 ms |
508 KB |
# of queries: 19900 |
5 |
Correct |
303 ms |
364 KB |
# of queries: 19900 |
6 |
Correct |
275 ms |
492 KB |
# of queries: 19900 |
7 |
Correct |
298 ms |
620 KB |
# of queries: 19900 |
8 |
Correct |
270 ms |
620 KB |
# of queries: 18528 |
9 |
Correct |
322 ms |
384 KB |
# of queries: 19701 |
10 |
Correct |
118 ms |
364 KB |
# of queries: 8256 |
11 |
Correct |
0 ms |
364 KB |
# of queries: 0 |
12 |
Correct |
1 ms |
364 KB |
# of queries: 1 |
13 |
Correct |
0 ms |
364 KB |
# of queries: 3 |
14 |
Correct |
1 ms |
364 KB |
# of queries: 6 |
15 |
Correct |
2 ms |
364 KB |
# of queries: 105 |
16 |
Correct |
7 ms |
364 KB |
# of queries: 351 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
327 ms |
364 KB |
# of queries: 18336 |
2 |
Correct |
239 ms |
748 KB |
# of queries: 18145 |
3 |
Correct |
299 ms |
620 KB |
# of queries: 19900 |
4 |
Correct |
279 ms |
508 KB |
# of queries: 19900 |
5 |
Correct |
303 ms |
364 KB |
# of queries: 19900 |
6 |
Correct |
275 ms |
492 KB |
# of queries: 19900 |
7 |
Correct |
298 ms |
620 KB |
# of queries: 19900 |
8 |
Correct |
270 ms |
620 KB |
# of queries: 18528 |
9 |
Correct |
322 ms |
384 KB |
# of queries: 19701 |
10 |
Correct |
118 ms |
364 KB |
# of queries: 8256 |
11 |
Correct |
0 ms |
364 KB |
# of queries: 0 |
12 |
Correct |
1 ms |
364 KB |
# of queries: 1 |
13 |
Correct |
0 ms |
364 KB |
# of queries: 3 |
14 |
Correct |
1 ms |
364 KB |
# of queries: 6 |
15 |
Correct |
2 ms |
364 KB |
# of queries: 105 |
16 |
Correct |
7 ms |
364 KB |
# of queries: 351 |
17 |
Runtime error |
8 ms |
492 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
18 |
Halted |
0 ms |
0 KB |
- |