Submission #503727

#TimeUsernameProblemLanguageResultExecution timeMemory
503727colossal_pepeSecret (JOI14_secret)C++17
6 / 100
7948 ms4392 KiB
#include <secret.h> using namespace std; int n, a[2005]; 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 ans = Secret(a[L], a[L + 1]); for (int i = L + 2; i <= R; i++) { ans = Secret(ans, a[i]); } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...