Submission #487184

#TimeUsernameProblemLanguageResultExecution timeMemory
487184AnasBenMoussaSecret (JOI14_secret)C++14
Compilation error
0 ms0 KiB
#include "secret.h" void Init(int N, int A[]){ for(int i=0;i<N;i++){ a[i]=A[i]; } } int Query(int L , int R){ int r; r=Secret(a[L+1],a[L]); for(int i=L+2;i<=R;i++){ r=Secret(r,a[i]); } return r; }

Compilation message (stderr)

secret.cpp: In function 'void Init(int, int*)':
secret.cpp:5:9: error: 'a' was not declared in this scope
    5 |         a[i]=A[i];
      |         ^
secret.cpp: In function 'int Query(int, int)':
secret.cpp:10:14: error: 'a' was not declared in this scope
   10 |     r=Secret(a[L+1],a[L]);
      |              ^