# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
585648 |
2022-06-29T07:22:58 Z |
박상훈(#8384) |
ICC (CEOI16_icc) |
C++14 |
|
18 ms |
756 KB |
#include "icc.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
struct DSU{
int path[111];
void init(int n){for (int i=1;i<=n;i++) path[i] = i;}
int find(int s){
if (s==path[s]) return s;
return path[s] = find(path[s]);
}
void merge(int s, int v){
s = find(s), v = find(v);
if (s==v) return;
path[s] = v;
}
}dsu;
int A[111], B[111];
void run(int n){
dsu.init(n);
for (int z=0;z<n-1;z++){
vector<int> V;
for (int i=1;i<=n;i++){
A[1] = i;
int cnt = 0;
for (int j=1;j<=n;j++) if (dsu.find(i)!=dsu.find(j)) B[++cnt] = j;
if (query(1, cnt, A+1, B+1)) V.push_back(i);
}
assert(V.size()==2);
setRoad(V[0], V[1]);
}
}
//int main(){}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
2 ms |
724 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
7 ms |
756 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
18 ms |
744 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
17 ms |
744 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
17 ms |
752 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
16 ms |
752 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |