#include <bits/stdc++.h>
#include "doll.h"
using namespace std;
void create_circuit(int M, std::vector<int> A) {
int l=A.size();
vector <int> C (M+1,0);
vector <int> X,Y (263000,0);
int d[263000];
// ## create_tree
for (int i=1;i<l;i++){
X[i]=-2*i;Y[i]=-(2*i+1);
}
// ## create_bot
d[0]=1;int k=1;
for (int i=1;i<l;i*=2)
{
k*=2;
for (int j=0;j<i;j++)
{
d[j+i]=d[j]*2;
d[j]=d[j]*2-1;
}
}
// ## transfer_bot
for (int i=0;i<k;i++)
{
if (l>d[i]-1) {
if ((k+i)%2==0) X[(k+i)/2]=A[d[i]-1];
else
Y[(k+i)/2]=A[d[i]-1];
C[d[i]-1]=-1;
}
}
// ##
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
5 ms |
4524 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
5 ms |
4524 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
5 ms |
4524 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
5 ms |
4556 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
4 ms |
4556 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
4 ms |
4556 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |