Submission #542651

#TimeUsernameProblemLanguageResultExecution timeMemory
542651__VariattoSecret (JOI14_secret)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "secret.h" using namespace std; #define pb push_back #define fi first #define se second #define ll long long const int MAX=1e3+10, L=10; int n, daq[MAX][L], q, a, b, t[MAX], pot; int Secret(int a, int b){ return 0; } int Query(int l, int r){ if(l==r) return t[l]; int x=__builtin_clz(l^r); return Secret(daq[l][x], daq[r][x]); } void rek(int pocz, int kon, int nr){ if(pocz==kon){ daq[pocz][nr]=t[pocz]; return; } int sr=(pocz+kon)/2; daq[sr][nr]=t[sr]; int akt=t[sr]; for(int i=sr-1; i>=pocz; i--) daq[i][nr]=Secret(daq[i+1][nr], t[i]); for(int i=sr+1; i<=kon; i++) daq[i][nr]=Secret(daq[i-1][nr], t[i]); rek(pocz, sr, nr-1); rek(sr+1, kon, nr-1); } void Init(int N, int A[]){ n=N; for(int i=0; i<n; i++) t[i]=A[i]; while((1<<pot)<n) pot++; rek(0, n-1, pot); } /*int main(){ ios_base::sync_with_stdio(false); cin.tie(0), cout.tie(0); }*/

Compilation message (stderr)

secret.cpp: In function 'void rek(int, int, int)':
secret.cpp:25:9: warning: unused variable 'akt' [-Wunused-variable]
   25 |     int akt=t[sr];
      |         ^~~
/usr/bin/ld: /tmp/ccNFFqUl.o: in function `Secret(int, int)':
secret.cpp:(.text+0x0): multiple definition of `Secret(int, int)'; /tmp/ccA2Z0ri.o:grader-full.cpp:(.text+0x2d0): first defined here
collect2: error: ld returned 1 exit status