# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
800977 | 8pete8 | Secret (JOI14_secret) | C++14 | 381 ms | 4336 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;
#define ll long long
#define f first
#define endl "\n"
#define s second
#define pii pair<int,int>
#define ppii pair<int,pii>
#define pb push_back
#define fastio ios::sync_with_stdio(false);cin.tie(NULL);
using namespace std;
const int mxn=1e3;
int tab[11][mxn+10],lg;
void Init(int N,int A[]){
for(int i=0;i<N;i++)tab[0][i]=A[i];
for(int i=1;i<=lg;i++){
for(int j=0;j+(1<<(i-1))<N;j++){
tab[i][j]=Secret(tab[i-1][j],tab[i-1][j+(1<<(i-1))]);
}
}
}
int Query(int L,int R){
lg=log2(R-L+1);
return Secret(tab[lg][L],tab[lg][R-(1<<lg)+1]);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |