Submission #1131112

#TimeUsernameProblemLanguageResultExecution timeMemory
1131112khoavn2008Secret (JOI14_secret)C++20
Compilation error
0 ms0 KiB
// #include "secret.h" #include <bits/stdc++.h> using namespace std; const int LOG = 14; int n, a[LOG + 1][10001]; void Init(int N, int A[]) { n = N; for(int i = 0; i < n; i++)a[0][i] = A[i]; for(int j = 1; j <= LOG; j++)for(int i = 0; i < n - (1 << j) + 1; i++){ a[j][i] = Secret(a[j - 1][i], a[j - 1][i + (1 << (j - 1))]); } } int Query(int L, int R) { int tmp = __lg(R - L + 1); return Secret(a[tmp][L], a[tmp][R - (1 << tmp) + 1]); }

Compilation message (stderr)

secret.cpp: In function 'void Init(int, int*)':
secret.cpp:10:19: error: 'Secret' was not declared in this scope
   10 |         a[j][i] = Secret(a[j - 1][i], a[j - 1][i + (1 << (j - 1))]);
      |                   ^~~~~~
secret.cpp: In function 'int Query(int, int)':
secret.cpp:15:12: error: 'Secret' was not declared in this scope
   15 |     return Secret(a[tmp][L], a[tmp][R - (1 << tmp) + 1]);
      |            ^~~~~~