#include "doll.h"
#include<bits/stdc++.h>
using namespace std;
vector<int> X, Y, C;
int ms(int a, int b) {
X.push_back(a);
Y.push_back(b);
return -Y.size();
}
vector<int> adj[500100];
void create_circuit(int M, std::vector<int> A) {
int n = A.size();
adj[0].push_back(A[0]);
A.push_back(0);
for(int i = 0; i < n; i++)
adj[A[i]].push_back(A[i+1]);
for(int i = 0; i <= M; i++) {
switch(adj[i].size()) {
case 1:C[i] = adj[i][0];break;
case 2:C[i] = ms(adj[i][0], adj[i][1]);break;
case 3:C[i] = ms(ms(adj[i][0], adj[i][2]), adj[i][1]);break;
case 4:C[i] = ms(ms(adj[i][0], adj[i][2]), ms(adj[i][1], adj[i][3]));break;
}
}
answer(C, X, Y);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
15 ms |
24208 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
15 ms |
24208 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
15 ms |
24208 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
15 ms |
24240 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
14 ms |
24180 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
14 ms |
24180 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |