#include "doll.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
void create_circuit(int M, vector<int> A) {
A.insert(A.begin(),0); A.push_back(0);
int n = A.size();
vector<int> C(M+1), X, Y;
int cnt[M+1]{0}, ind = 1;
for(int i = 0; i < n-1; i++){
cnt[A[i]]++;
if(cnt[A[i]]==2 and A[i])
X.pb(A[i]), Y.pb(A[i+1]),C[A[i-1]]=-ind, ind++;
else C[A[i]]=A[i+1];
}
answer(C,X,Y);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
15 ms |
2384 KB |
Output is correct |
3 |
Correct |
12 ms |
1836 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
9 ms |
1876 KB |
Output is correct |
6 |
Correct |
18 ms |
2816 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
15 ms |
2384 KB |
Output is correct |
3 |
Correct |
12 ms |
1836 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
9 ms |
1876 KB |
Output is correct |
6 |
Correct |
18 ms |
2816 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Incorrect |
31 ms |
4548 KB |
wrong motion |
9 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
15 ms |
2384 KB |
Output is correct |
3 |
Correct |
12 ms |
1836 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
9 ms |
1876 KB |
Output is correct |
6 |
Correct |
18 ms |
2816 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Incorrect |
31 ms |
4548 KB |
wrong motion |
9 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |