#include "doll.h"
//#include "grader.cpp"
#include <bits/stdc++.h>
using namespace std;
const int NN=2e5+5;
vector<int> g[NN];
vector<int> x,y;
#define pb push_back
void create_circuit(int m, vector<int> a) {
int n=a.size();
vector<int> c(m+1);
c[0]=a[0];
for(int i=0;i<n-1;i++){
g[a[i]].push_back(a[i+1]);
c[a[i]]=a[i+1];
}
int id=-1;
for(int i=1;i<=m;i++){
int sz=g[i].size();
if(sz<=1) continue;
c[i]=id--;
if(sz==2){
x.pb(g[i][0]);
y.pb(g[i][1]);
}
else if(sz==3){
x.pb(id--);
y.pb(id--);
x.pb(c[i]);
y.pb(g[i][1]);
x.pb(g[i][0]);
y.pb(g[i][2]);
}
else{
x.pb(id--);
y.pb(id--);
x.pb(g[i][0]);
y.pb(g[i][1]);
x.pb(g[i][2]);
y.pb(g[i][3]);
}
}
answer(c,x,y);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
4948 KB |
Output is correct |
2 |
Correct |
24 ms |
9112 KB |
Output is correct |
3 |
Correct |
21 ms |
8788 KB |
Output is correct |
4 |
Correct |
2 ms |
4948 KB |
Output is correct |
5 |
Correct |
11 ms |
6100 KB |
Output is correct |
6 |
Correct |
38 ms |
10700 KB |
Output is correct |
7 |
Correct |
3 ms |
4948 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
4948 KB |
Output is correct |
2 |
Correct |
24 ms |
9112 KB |
Output is correct |
3 |
Correct |
21 ms |
8788 KB |
Output is correct |
4 |
Correct |
2 ms |
4948 KB |
Output is correct |
5 |
Correct |
11 ms |
6100 KB |
Output is correct |
6 |
Correct |
38 ms |
10700 KB |
Output is correct |
7 |
Correct |
3 ms |
4948 KB |
Output is correct |
8 |
Incorrect |
41 ms |
11344 KB |
wrong motion |
9 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
4948 KB |
Output is correct |
2 |
Correct |
24 ms |
9112 KB |
Output is correct |
3 |
Correct |
21 ms |
8788 KB |
Output is correct |
4 |
Correct |
2 ms |
4948 KB |
Output is correct |
5 |
Correct |
11 ms |
6100 KB |
Output is correct |
6 |
Correct |
38 ms |
10700 KB |
Output is correct |
7 |
Correct |
3 ms |
4948 KB |
Output is correct |
8 |
Incorrect |
41 ms |
11344 KB |
wrong motion |
9 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
4 ms |
4948 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
3 ms |
4948 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
3 ms |
4948 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |