#include "doll.h"
#include<bits/stdc++.h>
using namespace std;
int liscie[1000010];
void create_circuit(int m, std::vector<int> A) {
A.push_back(0);
int n = A.size(), i;
int base = 1;
int log = 1;
while(base<n){
base*=2;
log++;
}
vector<int>pozycje;
for(i=0;i<base;i++){
int x = i;
int res = 0;
int pom = base/2;
while(x>0){
if(x%2)res+=pom;
pom/=2;
x/=2;
}
pozycje.push_back(res);
}
for(i=0;i<base;i++)liscie[i] = -1;
for(i=n-1;i>=0;i--){
liscie[pozycje[pozycje.size()-(n-i)]] = A[i];
}
vector<int>C(m+1, -1);
vector<int>X,Y;
for(i=1;i<base;i++){
if(i*2<base){
X.push_back(-(i*2));
Y.push_back(-(i*2+1));
}
else{
X.push_back(liscie[i*2-base]);
Y.push_back(liscie[i*2+1-base]);
}
}
answer(C, X, Y);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
0 ms |
348 KB |
Output is partially correct |
2 |
Partially correct |
49 ms |
11016 KB |
Output is partially correct |
3 |
Partially correct |
48 ms |
11264 KB |
Output is partially correct |
4 |
Partially correct |
55 ms |
11584 KB |
Output is partially correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
0 ms |
348 KB |
Output is partially correct |
2 |
Partially correct |
49 ms |
11016 KB |
Output is partially correct |
3 |
Partially correct |
48 ms |
11264 KB |
Output is partially correct |
4 |
Partially correct |
55 ms |
11584 KB |
Output is partially correct |
5 |
Partially correct |
58 ms |
11952 KB |
Output is partially correct |
6 |
Partially correct |
59 ms |
11844 KB |
Output is partially correct |
7 |
Partially correct |
59 ms |
11852 KB |
Output is partially correct |
8 |
Partially correct |
55 ms |
11584 KB |
Output is partially correct |
9 |
Partially correct |
49 ms |
11004 KB |
Output is partially correct |
10 |
Partially correct |
61 ms |
11588 KB |
Output is partially correct |
11 |
Partially correct |
54 ms |
11588 KB |
Output is partially correct |
12 |
Partially correct |
51 ms |
10808 KB |
Output is partially correct |
13 |
Partially correct |
50 ms |
11004 KB |
Output is partially correct |
14 |
Partially correct |
56 ms |
11012 KB |
Output is partially correct |
15 |
Partially correct |
55 ms |
11008 KB |
Output is partially correct |
16 |
Partially correct |
2 ms |
680 KB |
Output is partially correct |
17 |
Correct |
30 ms |
8780 KB |
Output is correct |
18 |
Partially correct |
55 ms |
10996 KB |
Output is partially correct |
19 |
Partially correct |
49 ms |
11004 KB |
Output is partially correct |
20 |
Partially correct |
56 ms |
11588 KB |
Output is partially correct |
21 |
Partially correct |
54 ms |
11588 KB |
Output is partially correct |
22 |
Partially correct |
54 ms |
11584 KB |
Output is partially correct |