# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
53147 | okaybody10 | Secret (JOI14_secret) | C++98 | 590 ms | 5528 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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-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)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |