Submission #800977

#TimeUsernameProblemLanguageResultExecution timeMemory
8009778pete8Secret (JOI14_secret)C++14
0 / 100
381 ms4336 KiB
#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 timeMemoryGrader output
Fetching results...