Submission #605800

# Submission time Handle Problem Language Result Execution time Memory
605800 2022-07-26T02:29:00 Z kawaii Secret (JOI14_secret) C++14
Compilation error
0 ms 0 KB
#include "secret.h"

void Init(int N, int A[]){
    int x = Secret(0, 1000000000);
}

int Query(int L, int R){
    int ans = a[L];
    for(int i = L + 1; i <= R; i++) ans += a[i];
    return ans;
}

Compilation message

secret.cpp: In function 'void Init(int, int*)':
secret.cpp:4:9: warning: unused variable 'x' [-Wunused-variable]
    4 |     int x = Secret(0, 1000000000);
      |         ^
secret.cpp: In function 'int Query(int, int)':
secret.cpp:8:15: error: 'a' was not declared in this scope
    8 |     int ans = a[L];
      |               ^