#include "doll.h"
#include <bits/stdc++.h>
using namespace std;
void create_circuit(int M, std::vector<int> A) {
int N = A.size();
std::vector<int> C(M + 1);
C[0] = -1;
for (int i = 1; i <= M; ++i) {
C[i] = -1;
}
int n = 1;
while(n < N+1)n*=2;
n/=2;
std::vector<int> X(2*n), Y(2*n);
for (int k = 1; k < n; ++k) {
X[k] = -(2*k);
Y[k] = -(2*k+1);
}
for(int k = n; k < 2*n; k++)
{
X[k] = -1;
Y[k] = -1;
}
for(int i = 0; i < N; i++)
{
int b = i;
int s = 1;
while(s < n)
{
s = 2*s + (b % 2);
b >>=1;
}
if(b%2==0)X[s] = A[i];
else Y[s] = A[i];
}
int s = 1;
while(s < n)
{
s = 2*s+1;
}
Y[s] = 0;//return to origin
X = vector<int>(X.begin()+1,X.end());
Y = vector<int>(Y.begin()+1,Y.end());
answer(C, X, Y);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
1 ms |
224 KB |
Output is partially correct |
2 |
Partially correct |
74 ms |
8588 KB |
Output is partially correct |
3 |
Partially correct |
76 ms |
8472 KB |
Output is partially correct |
4 |
Partially correct |
82 ms |
8720 KB |
Output is partially correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
1 ms |
224 KB |
Output is partially correct |
2 |
Partially correct |
74 ms |
8588 KB |
Output is partially correct |
3 |
Partially correct |
76 ms |
8472 KB |
Output is partially correct |
4 |
Partially correct |
82 ms |
8720 KB |
Output is partially correct |
5 |
Partially correct |
95 ms |
9956 KB |
Output is partially correct |
6 |
Partially correct |
86 ms |
9760 KB |
Output is partially correct |
7 |
Partially correct |
85 ms |
9868 KB |
Output is partially correct |
8 |
Partially correct |
86 ms |
9488 KB |
Output is partially correct |
9 |
Partially correct |
70 ms |
8480 KB |
Output is partially correct |
10 |
Partially correct |
82 ms |
9352 KB |
Output is partially correct |
11 |
Partially correct |
101 ms |
9120 KB |
Output is partially correct |
12 |
Partially correct |
77 ms |
8796 KB |
Output is partially correct |
13 |
Partially correct |
77 ms |
9200 KB |
Output is partially correct |
14 |
Partially correct |
82 ms |
9216 KB |
Output is partially correct |
15 |
Partially correct |
78 ms |
9352 KB |
Output is partially correct |
16 |
Partially correct |
3 ms |
460 KB |
Output is partially correct |
17 |
Correct |
47 ms |
4776 KB |
Output is correct |
18 |
Partially correct |
82 ms |
8716 KB |
Output is partially correct |
19 |
Partially correct |
75 ms |
8756 KB |
Output is partially correct |
20 |
Partially correct |
85 ms |
9364 KB |
Output is partially correct |
21 |
Partially correct |
88 ms |
9072 KB |
Output is partially correct |
22 |
Partially correct |
86 ms |
9104 KB |
Output is partially correct |