Submission #1052771

# Submission time Handle Problem Language Result Execution time Memory
1052771 2024-08-10T20:57:54 Z wood Mechanical Doll (IOI18_doll) C++17
47 / 100
39 ms 9524 KB
#include "doll.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
void create_circuit(int M, std::vector<int> A) {
	int N = A.size();
	vector<int> res(M+1,-1), x, y;
	res[0] = A[0];
	int logn = 1, size = 1;
	while(size<N){
		size*=2;
		logn++;
	}
	int size2 = size/2;
	for(int i = 1; i<size2; i++){
		x.pb(-2*i);
		y.pb(-2*i-1);
	}
	vector<int> list = {1};

	while(size2>0){
		int pp = list.size();
		for(int i = 0; i<pp; i++) list.pb(min(list[i]+size2,N));
		size2>>=1;
	}
	A.pb(-1);
	for(int i = 0; i<size-1; i++){
		if(i&1) y.pb(A[list[i]]);
		else x.pb(A[list[i]]);
	}
	y.pb(0);
	answer(res,x,y);
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 1 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 0 ms 344 KB Output is partially correct
2 Correct 20 ms 5040 KB Output is correct
3 Partially correct 31 ms 8764 KB Output is partially correct
4 Partially correct 39 ms 9520 KB Output is partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 0 ms 344 KB Output is partially correct
2 Correct 20 ms 5040 KB Output is correct
3 Partially correct 31 ms 8764 KB Output is partially correct
4 Partially correct 39 ms 9520 KB Output is partially correct
5 Partially correct 39 ms 9524 KB Output is partially correct
6 Partially correct 38 ms 9272 KB Output is partially correct
7 Partially correct 38 ms 9384 KB Output is partially correct
8 Partially correct 36 ms 9268 KB Output is partially correct
9 Partially correct 31 ms 8768 KB Output is partially correct
10 Partially correct 36 ms 9192 KB Output is partially correct
11 Partially correct 35 ms 9200 KB Output is partially correct
12 Partially correct 31 ms 8688 KB Output is partially correct
13 Correct 21 ms 5820 KB Output is correct
14 Partially correct 38 ms 8768 KB Output is partially correct
15 Partially correct 32 ms 8768 KB Output is partially correct
16 Partially correct 1 ms 604 KB Output is partially correct
17 Correct 19 ms 5452 KB Output is correct
18 Correct 21 ms 5288 KB Output is correct
19 Partially correct 31 ms 8680 KB Output is partially correct
20 Partially correct 37 ms 9184 KB Output is partially correct
21 Partially correct 35 ms 9264 KB Output is partially correct
22 Partially correct 35 ms 9188 KB Output is partially correct