# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
48652 |
2018-05-17T16:57:37 Z |
Pajaraja |
Secret (JOI14_secret) |
C++17 |
|
3696 ms |
524288 KB |
#include "secret.h"
#include <bits/stdc++.h>
#define MAXN 1007
using namespace std;
int val[MAXN][MAXN],a[MAXN],n;
void rek(int l,int r)
{
int s=(l+r)/2;
val[s][s]=a[s];
for(int i=s-1;i>=l;i--) val[i][s]=Secret(a[i],val[i+1][s]);
val[s+1][s+1]=a[s+1];
for(int i=s+1;i<=r;i++) val[s+1][i]=Secret(val[s+1][i-1],a[i]);
rek(l,s);
rek(s+1,r);
}
void Init(int N, int A[])
{
n=N;
for(int i=0;i<n;i++) a[i]=A[i];
rek(0,n-1);
}
int ans(int l,int r,int lt,int rt)
{
int s=(l+r)/2;
if(lt<=s && rt>s) return Secret(val[lt][s],val[s+1][rt]);
if(rt<=s) return ans(l,s,lt,rt);
return ans(s+1,r,lt,rt);
}
int Query(int L, int R) {return ans(0,n-1,L,R);}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
3373 ms |
524288 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Runtime error |
3155 ms |
524288 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
3 |
Runtime error |
2872 ms |
524288 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
4 |
Runtime error |
3442 ms |
524288 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
5 |
Runtime error |
3373 ms |
524288 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
6 |
Runtime error |
3244 ms |
524288 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
7 |
Runtime error |
3696 ms |
524288 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
8 |
Runtime error |
3156 ms |
524288 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
9 |
Runtime error |
3315 ms |
524288 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
10 |
Runtime error |
3185 ms |
524288 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |