제출 #1128885

#제출 시각아이디문제언어결과실행 시간메모리
1128885Nurislam비밀 (JOI14_secret)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "secret.h" #include "grader.cpp" int lc[10][1001]; void Init(int n, int a[]) { for(int i = 1; i <= n; i++){ lc[0][i] = a[i-1]; } for(int i = 1; i < 10; i++){ int len = (1<<i), hal = (1<<(i-1)); for(int j = 1; j+len-1 <= n; j++){ lc[i][j] = Secret(lc[i-1][j], lc[i-1][j+hal]); } } } int Query(int l, int r) { int ans = INT_MIN; for(int i = 9; i >= 0; i--){ int len = (1<<i); if(l + len-1 <= r){ if(ans == INT_MIN)ans = lc[i][l]; else{ ans = Secret(ans, lc[i][l]); } l+=len; } } return ans; }

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

/usr/bin/ld: /tmp/cct1083u.o: in function `Secret(int, int)':
grader.cpp:(.text+0x2d0): multiple definition of `Secret(int, int)'; /tmp/ccGYiMK1.o:secret.cpp:(.text+0x2d0): first defined here
/usr/bin/ld: /tmp/cct1083u.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccGYiMK1.o:secret.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status