제출 #1310464

#제출 시각아이디문제언어결과실행 시간메모리
1310464em4ma2비밀 (JOI14_secret)C++20
컴파일 에러
0 ms0 KiB
#include "bits/stdc++.h" #include "secret.h" using namespace std; #define int long long #define ll long long #define pb push_back const int mxsz=1000; int dst[11][mxsz]; int Query(int l,int r){ int x=__builtin_clz(max(l,r))-(l^r); return Secret(dst[l][x],dst[r][x]); } void Init(int n,int a[]){ int cnt=2; for (int i=0;i<11;i++){ int k=i+1; while (k--){ int mx=n/cnt; int cnt2=0; bool b=0; if (!b){ for (int j=cnt2+mx;j>=0;j--){ cnt2++; if (j==cnt2+mx){ dst[i][j]=a[j]; } else dst[i][j]=Secret(dst[i][j-1],a[j]); } }else{ for (int j=cnt2;j<cnt2+mx;j++){ if (j==cnt2)dst[i][j]=a[j]; else dst[i][j]=Secret(dst[i][j-1],a[j]); } cnt2+=mx; } } cnt+=2; } } // signed main(){ // ios::sync_with_stdio(0); // cin.tie(0); // cout.tie(0); // int n; // cin>>n; // int a[n]; // for (int i=0;i<n;i++){ // cin>>a[i]; // } // return 0; // }

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

/usr/bin/ld: /tmp/cciAGHWh.o: in function `main':
grader.cpp:(.text.startup+0x2c7): undefined reference to `Init(int, int*)'
/usr/bin/ld: grader.cpp:(.text.startup+0x314): undefined reference to `Query(int, int)'
collect2: error: ld returned 1 exit status