#include "doll.h"
#include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define all(x) x.begin(),x.end()
typedef long long ll;
#define INF 99999999999999
#define pb push_back
void create_circuit(int M, std::vector<int> A) {
int N = A.size()+1;
A.pb(0);
vector<int> C(M + 1);
vector<bool>vis(M+1,0);
vector<int>sw(M+1,0);
ll idx=0;
vector<int> X, Y;
for(int i=0;i<N-1;i++)
{
if(!vis[A[i]])
{
vis[A[i]]=1;
X.pb(-(idx+1));
Y.pb(A[i+1]);
sw[A[i]]=idx++;
continue;
}
ll curr=sw[A[i]];
X[curr]=Y[curr];
Y[curr]=A[i+1];
}
answer(C, X, Y);
}
# |
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 |
- |
# |
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 |
0 ms |
212 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
296 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
296 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |