Submission #1329191

#TimeUsernameProblemLanguageResultExecution timeMemory
1329191alinurSecret (JOI14_secret)C++17
0 / 100
5930 ms4428 KiB
#include "secret.h"
#include <iostream>
#define ll long long

using namespace std;

ll a[1001], pref[1001], b[1001];
ll mod = 1e9;
void Init(int N, int A[]) {
    int n = N;
    pref[0] = 0;
    for (int i = 1; i <= n; i++) a[i] = A[i - 1], b[i] = a[i] % 2, a[i] -= a[i] % 2, pref[i] = pref[i - 1] + a[i];
}

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