#include "bits/stdc++.h"
#include "doll.h"
//#define int long long
#define all(v) v.begin() , v.end()
#define sz(a) (int)a.size()
using namespace std;
void create_circuit(int m, vector<int> a){
int n = sz(a);
vector<int> c(m+1),x,y;
vector<int> adj[m+5];
for(int i=0;i<n;i++){
if(i==0) adj[0].push_back(a[i]);
else{
adj[a[i-1]].push_back(a[i]);
}
}
adj[a.back()].push_back(0);
for(int i=0;i<=m;i++){
if(sz(adj[i])==0) c[i]=i;
if(sz(adj[i])==1) c[i]=adj[i][0];
}
answer(c, x, y);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
336 KB |
Output is correct |
2 |
Correct |
22 ms |
6752 KB |
Output is correct |
3 |
Correct |
19 ms |
5712 KB |
Output is correct |
4 |
Correct |
1 ms |
336 KB |
Output is correct |
5 |
Correct |
10 ms |
3920 KB |
Output is correct |
6 |
Correct |
26 ms |
8528 KB |
Output is correct |
7 |
Correct |
1 ms |
336 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
336 KB |
Output is correct |
2 |
Correct |
22 ms |
6752 KB |
Output is correct |
3 |
Correct |
19 ms |
5712 KB |
Output is correct |
4 |
Correct |
1 ms |
336 KB |
Output is correct |
5 |
Correct |
10 ms |
3920 KB |
Output is correct |
6 |
Correct |
26 ms |
8528 KB |
Output is correct |
7 |
Correct |
1 ms |
336 KB |
Output is correct |
8 |
Incorrect |
24 ms |
6728 KB |
wrong motion |
9 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
336 KB |
Output is correct |
2 |
Correct |
22 ms |
6752 KB |
Output is correct |
3 |
Correct |
19 ms |
5712 KB |
Output is correct |
4 |
Correct |
1 ms |
336 KB |
Output is correct |
5 |
Correct |
10 ms |
3920 KB |
Output is correct |
6 |
Correct |
26 ms |
8528 KB |
Output is correct |
7 |
Correct |
1 ms |
336 KB |
Output is correct |
8 |
Incorrect |
24 ms |
6728 KB |
wrong motion |
9 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |