Submission #1271747

#TimeUsernameProblemLanguageResultExecution timeMemory
1271747orzorzorzSecret (JOI14_secret)C++20
6 / 100
6253 ms4412 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 timeMemoryGrader output
Fetching results...