Submission #522446

# Submission time Handle Problem Language Result Execution time Memory
522446 2022-02-05T03:59:24 Z dongliu0426 Secret (JOI14_secret) C++17
0 / 100
451 ms 4372 KB
#include "secret.h"

#define N	1000
#define L	9

int ll[N + 1], tt[L + 1][N];

void Init(int n, int *aa) {
	int i, j;

	for (i = 2; i <= n; i++)
		ll[i] = ll[i >> 1] + 1;
	for (i = 0; i < n; i++)
		tt[0][i] = aa[i];
	for (j = 1; 1 << j <= n; j++)
		for (i = 0; i + (1 << j) <= n; i++)
			tt[j][i] = Secret(tt[j - 1][i], tt[j - 1][i + (1 << (j - 1))]);
}

int Query(int l, int r) {
	int d = ll[r - l + 1];

	return Secret(tt[d][l], tt[d][r - (1 << d) + 1]);
}
# Verdict Execution time Memory Grader output
1 Incorrect 119 ms 2372 KB Wrong Answer: Query(222, 254) - expected : 34031541, actual : 839935006.
2 Incorrect 116 ms 2284 KB Wrong Answer: Query(60, 375) - expected : 669221184, actual : 73044041.
3 Incorrect 112 ms 2372 KB Wrong Answer: Query(211, 401) - expected : 674373968, actual : 951413062.
4 Incorrect 435 ms 4248 KB Wrong Answer: Query(90, 497) - expected : 397934825, actual : 889372840.
5 Incorrect 443 ms 4176 KB Wrong Answer: Query(587, 915) - expected : 752404486, actual : 389074008.
6 Incorrect 429 ms 4240 KB Wrong Answer: Query(915, 915) - expected : 282904741, actual : 31281100.
7 Incorrect 438 ms 4372 KB Wrong Answer: Query(84, 976) - expected : 742463504, actual : 709920818.
8 Incorrect 422 ms 4256 KB Wrong Answer: Query(58, 987) - expected : 20022464, actual : 225603928.
9 Incorrect 451 ms 4192 KB Wrong Answer: Query(33, 967) - expected : 676869696, actual : 819205962.
10 Incorrect 439 ms 4292 KB Wrong Answer: Query(116, 961) - expected : 68487362, actual : 538241930.