Submission #1293670

#TimeUsernameProblemLanguageResultExecution timeMemory
1293670rayan_bdSecret (JOI14_secret)C++20
6 / 100
6131 ms4404 KiB
#include <bits/stdc++.h>
#include "secret.h"

using namespace std;

const int mxN = 1005;

int a[mxN], n;

void Init(int N, int A[]) {
    n = N;
    for(int i = 0; i <= n; ++i) a[i] = A[i];
}

int Query(int L, int R) {
    if(L == R) return a[L];
    int x = Secret(a[L], a[L + 1]);
    for(int i = L + 2; i <= R; ++i){
        x = Secret(x, a[i]);
    }
    return x;
}
#Verdict Execution timeMemoryGrader output
Fetching results...