#include <bits/stdc++.h>
#include "secret.h"
using namespace std;
typedef long long ll;
ll T[1006];
int B[1006];
void Init(int N,int A[])
{
for(int i=0;i<N;i++) B[i]=A[i];
for(int i=0;i<N-1;i++) T[i]=Secret(A[i],A[i+1]);
}
int Query(int L,int R)
{
if(R==L) return B[L];
if(R==L+1) return T[L];
int mid=(L+R)/2;
return Secret(Query(L,(L+R)/2),Query((L+R)/2+1,R));
}
Compilation message
secret.cpp: In function 'int Query(int, int)':
secret.cpp:16:9: warning: unused variable 'mid' [-Wunused-variable]
int mid=(L+R)/2;
^~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1288 ms |
2424 KB |
Output isn't correct - number of calls to Secret by Init = 510, maximum number of calls to Secret by Query = 255 |
2 |
Incorrect |
1270 ms |
2520 KB |
Output isn't correct - number of calls to Secret by Init = 511, maximum number of calls to Secret by Query = 255 |
3 |
Incorrect |
1324 ms |
2596 KB |
Output isn't correct - number of calls to Secret by Init = 512, maximum number of calls to Secret by Query = 255 |
4 |
Incorrect |
2943 ms |
4560 KB |
Output isn't correct - number of calls to Secret by Init = 998, maximum number of calls to Secret by Query = 511 |
5 |
Incorrect |
2849 ms |
4604 KB |
Output isn't correct - number of calls to Secret by Init = 999, maximum number of calls to Secret by Query = 511 |
6 |
Partially correct |
584 ms |
4764 KB |
Output is partially correct - number of calls to Secret by Init = 999, maximum number of calls to Secret by Query = 6 |
7 |
Incorrect |
6666 ms |
4764 KB |
Output isn't correct - number of calls to Secret by Init = 999, maximum number of calls to Secret by Query = 511 |
8 |
Incorrect |
6716 ms |
4764 KB |
Output isn't correct - number of calls to Secret by Init = 999, maximum number of calls to Secret by Query = 511 |
9 |
Incorrect |
6489 ms |
4764 KB |
Output isn't correct - number of calls to Secret by Init = 999, maximum number of calls to Secret by Query = 511 |
10 |
Incorrect |
6489 ms |
4764 KB |
Output isn't correct - number of calls to Secret by Init = 999, maximum number of calls to Secret by Query = 511 |