제출 #605802

#제출 시각아이디문제언어결과실행 시간메모리
605802kawaii비밀 (JOI14_secret)C++14
컴파일 에러
0 ms0 KiB
#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;
}

컴파일 시 표준 에러 (stderr) 메시지

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];
      |               ^