# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
116000 |
2019-06-10T07:04:40 Z |
minhcool |
Secret (JOI14_secret) |
C++17 |
|
479 ms |
4452 KB |
#include<bits/stdc++.h>
#include "secret.h"
using namespace std;
int ans[1001][11], n, b[1001];
int ask(int x, int y){
return Secret(x, y);
}
void build(){
for(int i = 1; i <= n; i++) ans[i][0] = b[i];
for(int i = 1; i < 10; i++){
int tmp = 1 << i;
for(int j = 1; j + tmp <= n; j++) ans[j][i] = ask(ans[j][i - 1], ans[j + (1 << (i - 1))][i - 1]);
}
}
void Init(int N, int A[]){
n = N;
for(int i = 1; i <= n; i++) b[i] = A[i - 1];
}
int Query(int x, int y){
x--;
y--;
int tmp = x, answer = 0;
for(int i = 9; i >= 0; i--){
if(tmp + (1 << i) > y) continue;
if(!answer) answer = ans[tmp][i];
else answer = ask(answer, ans[tmp][i]);
tmp += (1 << i);
}
return answer;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
128 ms |
2424 KB |
Wrong Answer: Query(222, 254) - expected : 34031541, actual : 0. |
2 |
Incorrect |
128 ms |
2428 KB |
Wrong Answer: Query(60, 375) - expected : 669221184, actual : 0. |
3 |
Incorrect |
128 ms |
2428 KB |
Wrong Answer: Query(211, 401) - expected : 674373968, actual : 0. |
4 |
Incorrect |
476 ms |
4400 KB |
Wrong Answer: Query(90, 497) - expected : 397934825, actual : 0. |
5 |
Incorrect |
477 ms |
4452 KB |
Wrong Answer: Query(587, 915) - expected : 752404486, actual : 0. |
6 |
Incorrect |
476 ms |
4344 KB |
Wrong Answer: Query(915, 915) - expected : 282904741, actual : 0. |
7 |
Incorrect |
477 ms |
4292 KB |
Wrong Answer: Query(84, 976) - expected : 742463504, actual : 0. |
8 |
Incorrect |
478 ms |
4400 KB |
Wrong Answer: Query(58, 987) - expected : 20022464, actual : 0. |
9 |
Incorrect |
477 ms |
4344 KB |
Wrong Answer: Query(33, 967) - expected : 676869696, actual : 0. |
10 |
Incorrect |
479 ms |
4344 KB |
Wrong Answer: Query(116, 961) - expected : 68487362, actual : 0. |