Submission #642661

#TimeUsernameProblemLanguageResultExecution timeMemory
642661TimDeeBrperm (RMI20_brperm)C++17
Compilation error
0 ms0 KiB
#include "brperm.h" #include <bits/stdc++.h> using namespace std; char s[(int)5e5 + 10] = {}; string S; void init(int n, string s) { S=s; } int query(int ind, int k) { for (int i=ind; i<ind+(1<<k); ++i) { int j=0; for (int b=k-1; b>=0; --b) { j+=(((i-ind)>>b)&1)<<(k-1-b); } if (S[i]!=S[ind+j]) return 0; } return 1; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccjhYfuY.o:(.bss+0x0): multiple definition of `s'; /tmp/ccBa21NZ.o:(.bss+0x20): first defined here
/usr/bin/ld: /tmp/ccjhYfuY.o: in function `main':
grader.cpp:(.text.startup+0x72): undefined reference to `init(int, char const*)'
collect2: error: ld returned 1 exit status