#include "doll.h"
#include<bits/stdc++.h>
#define F first
#define S second
using namespace std;
int m,n,c[800010],x[800010],y[800010],now;
vector<int> e[200010];
vector<int> a;
void create_circuit(int M, std::vector<int> A) {
now=0;
n=A.size();
m=M;
a=A;
a.push_back(0);
for(int i=0;i<n;i++){
//cout<<a[i]<<" "<<a[i+1]<<'\n';
e[a[i]].push_back(a[i+1]);
}
c[0]=a[0];
for(int i=1;i<=m;i++){
int ne=e[i].size();
if(ne==0)continue;
if(ne==1){
c[i]=e[i][0];
continue;
}
if(ne==2){
now--;
c[i]=now;
x[-now]=e[i][0];
y[-now]=e[i][1];
continue;
}
if(ne==3){
}
if(ne==4){
}
}
vector<int> C,X,Y;
C.resize(M+1);
X.resize(-now);
Y.resize(-now);
for(int i=0;i<=m;i++)C[i]=c[i];
for(int i=0;i<-now;i++){
X[i]=x[i+1];
Y[i]=y[i+1];
}
answer(C,X,Y);
return;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
4952 KB |
Output is correct |
2 |
Correct |
20 ms |
9816 KB |
Output is correct |
3 |
Correct |
16 ms |
9372 KB |
Output is correct |
4 |
Correct |
2 ms |
4956 KB |
Output is correct |
5 |
Correct |
10 ms |
6488 KB |
Output is correct |
6 |
Correct |
23 ms |
11852 KB |
Output is correct |
7 |
Correct |
2 ms |
4956 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
4952 KB |
Output is correct |
2 |
Correct |
20 ms |
9816 KB |
Output is correct |
3 |
Correct |
16 ms |
9372 KB |
Output is correct |
4 |
Correct |
2 ms |
4956 KB |
Output is correct |
5 |
Correct |
10 ms |
6488 KB |
Output is correct |
6 |
Correct |
23 ms |
11852 KB |
Output is correct |
7 |
Correct |
2 ms |
4956 KB |
Output is correct |
8 |
Correct |
32 ms |
13388 KB |
Output is correct |
9 |
Correct |
34 ms |
13640 KB |
Output is correct |
10 |
Correct |
48 ms |
17712 KB |
Output is correct |
11 |
Correct |
3 ms |
4952 KB |
Output is correct |
12 |
Correct |
3 ms |
4956 KB |
Output is correct |
13 |
Correct |
3 ms |
4956 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
4952 KB |
Output is correct |
2 |
Correct |
20 ms |
9816 KB |
Output is correct |
3 |
Correct |
16 ms |
9372 KB |
Output is correct |
4 |
Correct |
2 ms |
4956 KB |
Output is correct |
5 |
Correct |
10 ms |
6488 KB |
Output is correct |
6 |
Correct |
23 ms |
11852 KB |
Output is correct |
7 |
Correct |
2 ms |
4956 KB |
Output is correct |
8 |
Correct |
32 ms |
13388 KB |
Output is correct |
9 |
Correct |
34 ms |
13640 KB |
Output is correct |
10 |
Correct |
48 ms |
17712 KB |
Output is correct |
11 |
Correct |
3 ms |
4952 KB |
Output is correct |
12 |
Correct |
3 ms |
4956 KB |
Output is correct |
13 |
Correct |
3 ms |
4956 KB |
Output is correct |
14 |
Incorrect |
36 ms |
11584 KB |
wrong motion |
15 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
4956 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
4956 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
4956 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |