#include "doll.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
#define mk make_pair
#define pb push_back
#define fr first
#define sc second
vector<int> S_x, S_y;
int create(vector<int> nodes) {
if(sz(nodes) == 1) return nodes[0];
vector<int> a, b;
for(int i = 0; i < sz(nodes); i+=2) a.pb(nodes[i]);
for(int i = 1; i < sz(nodes); i+=2) b.pb(nodes[i]);
S_x.pb(create(a));
S_y.pb(create(b));
return -sz(S_x);
}
void create_circuit(int M, vector<int> A) {
vector<vector<int>> edges(M+1);
A.pb(0);
for(int i = 0; i < M; i++)
edges[A[i]].pb(A[i+1]);
vector<int> ans = {A[0]};
for(int i = 1; i <= M; i++)
if(sz(edges[i])) ans.pb(create(edges[i]));
else ans.pb(i);
answer(ans, S_x, S_y);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
25 ms |
7256 KB |
Output is correct |
3 |
Correct |
18 ms |
5716 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Runtime error |
3 ms |
5212 KB |
Execution killed with signal 11 |
6 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
25 ms |
7256 KB |
Output is correct |
3 |
Correct |
18 ms |
5716 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Runtime error |
3 ms |
5212 KB |
Execution killed with signal 11 |
6 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
25 ms |
7256 KB |
Output is correct |
3 |
Correct |
18 ms |
5716 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Runtime error |
3 ms |
5212 KB |
Execution killed with signal 11 |
6 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |