Submission #1086668

#TimeUsernameProblemLanguageResultExecution timeMemory
1086668LeonidCukSecret (JOI14_secret)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "secret.h" using namespace std; vector<int>v,dp[11]; void daq(int i,int l,int r) { if(l==r) { dp[i][l]=v[l]; return; } int m=(l+r)/2; dp[i][m]=v[m]; for(int j=m-1;j>=l;j++) { dp[i][j]=Secret(dp[i][j+1],v[j]); } dp[i][m+1]=v[m+1]; for(int j=m+2;j<=r;j++) { dp[i][j]=Secret(dp[i][j-1],v[j]); } daq(i+1,l,m); daq(i+1,m+1,r); } int najdi(int i,int l,int r) { if(l==r) { return v[l]; } int m=(l+r)/2; if(l<=m&&m<r) { return Secret(dp[i][l],dp[i][r]); } else if(r<=m) { return najdi(i+1,l,m); } else { return najdi(i+1,m+1,r); } } void Innit(int N,int A[]) { for(int i=0;i<N;i++) { v.push_back(A[i]); } for(int i=0;i<12;i++) { dp[i].resize(N); } daq(0,0,N-1); } int Query(int l,int r) { return najdi(0,l,r); }

Compilation message (stderr)

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