Submission #53148

#TimeUsernameProblemLanguageResultExecution timeMemory
53148okaybody10Secret (JOI14_secret)C++98
6 / 100
6716 ms4764 KiB
#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 (stderr)

secret.cpp: In function 'int Query(int, int)':
secret.cpp:16:9: warning: unused variable 'mid' [-Wunused-variable]
     int mid=(L+R)/2;
         ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...