# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1271747 | orzorzorz | Secret (JOI14_secret) | C++20 | 6253 ms | 4412 KiB |
#include "secret.h"
#include<bits/stdc++.h>
using namespace std;
const int mxN=1e3;
int c[mxN];
void Init(int N, int A[]) {
for(int i=0; i<N; i++) c[i]=A[i];
}
int Query(int L, int R) {
if(L==R) return c[L];
int res=Secret(c[L], c[L+1]);
for(int i=L+2; i<=R; i++) {
res=Secret(res, c[i]);
}
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |