Submission #730973

#TimeUsernameProblemLanguageResultExecution timeMemory
730973alexddSecret (JOI14_secret)C++17
Compilation error
0 ms0 KiB
#include "secret.h" #include<bits/stdc++.h> using namespace std; #define int long long int bit[2][2]; int a[1005]; int n; int op(int x, int y) { int rez=0,a,b; for(int i=0;i<30;i++) { a = ((x&(1<<i))!=0); b = ((y&(1<<i))!=0); rez += (1<<i) * bit[a][b]; } return rez; } void Init(int N, int A[]) { for(int i=0;i<2;i++) for(int j=0;j<2;j++) bit[i][j] = Secret(i,j); n=N; for(int i=1;i<=n;i++) a[i]=A[i]; } int Query(int L, int R) { int rez = a[L]; for(int i=L+1;i<=R;i++) { rez = op(rez, a[L]); } return rez; }

Compilation message (stderr)

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