#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<int> c;
vector<int> x;
vector<int> y;
vector<vector<int>> cons;
void answer(vector<int> one, vector<int> two, vector<int> three);
void create_circuit(int m, vector<int> a) {
cons.resize(m+1);
c.resize(m+1, -1);
c[0] = a[0];
int maxPow = ceil(log2(a.size()));
a.resize( pow(2,maxPow), -1 );
a.push_back(0);
for (int j = 1; j < pow(2,maxPow); j++) {
x.push_back(-j*2 );
y.push_back(-j*2 - 1);
}
vector<int> ord;
ord.push_back( pow(2,maxPow) );
int curPow = pow(2,maxPow-1);
while (curPow > 0) {
int curSize = ord.size();
for (int i = 0; i < curSize; i++) {
ord.push_back(ord[i] - curPow);
}
curPow/=2;
}
int cnt = 0;
for (int j = pow(2,maxPow)-2; j >= pow(2,maxPow-1)-1; j--) {
y[j] = a[ord[cnt++]];
x[j] = a[ord[cnt++]];
}
answer(c,x,y);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
204 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
0 ms |
204 KB |
Output is partially correct |
2 |
Correct |
54 ms |
6180 KB |
Output is correct |
3 |
Partially correct |
84 ms |
9172 KB |
Output is partially correct |
4 |
Partially correct |
93 ms |
9636 KB |
Output is partially correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
0 ms |
204 KB |
Output is partially correct |
2 |
Correct |
54 ms |
6180 KB |
Output is correct |
3 |
Partially correct |
84 ms |
9172 KB |
Output is partially correct |
4 |
Partially correct |
93 ms |
9636 KB |
Output is partially correct |
5 |
Partially correct |
100 ms |
11020 KB |
Output is partially correct |
6 |
Partially correct |
99 ms |
10536 KB |
Output is partially correct |
7 |
Partially correct |
97 ms |
10844 KB |
Output is partially correct |
8 |
Partially correct |
98 ms |
10216 KB |
Output is partially correct |
9 |
Partially correct |
95 ms |
9284 KB |
Output is partially correct |
10 |
Partially correct |
96 ms |
10004 KB |
Output is partially correct |
11 |
Partially correct |
97 ms |
9780 KB |
Output is partially correct |
12 |
Partially correct |
83 ms |
9296 KB |
Output is partially correct |
13 |
Correct |
55 ms |
7072 KB |
Output is correct |
14 |
Partially correct |
89 ms |
9816 KB |
Output is partially correct |
15 |
Partially correct |
88 ms |
10068 KB |
Output is partially correct |
16 |
Partially correct |
3 ms |
588 KB |
Output is partially correct |
17 |
Correct |
52 ms |
6488 KB |
Output is correct |
18 |
Correct |
52 ms |
6488 KB |
Output is correct |
19 |
Partially correct |
85 ms |
9196 KB |
Output is partially correct |
20 |
Partially correct |
104 ms |
9884 KB |
Output is partially correct |
21 |
Partially correct |
99 ms |
9780 KB |
Output is partially correct |
22 |
Partially correct |
95 ms |
9760 KB |
Output is partially correct |