Submission #596657

#TimeUsernameProblemLanguageResultExecution timeMemory
596657pedroslreyBrperm (RMI20_brperm)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "brperm.h" using namespace std; const int MAXN = 1010; char s[MAXN]; int n; void init(int nn, const char ss[]) { n = nn; for (int i = 0; i < n; ++i) s[i] = ss[i]; } int query(int x, int k) { for (int mask = 0; mask < 1 << k; ++mask) { int rev = 0; for (int i = 0; i < k; ++i) if (mask & (1 << i)) rev |= 1 << (k - 1 - i); if (s[x + mask] != s[x + rev]) return 0; } return 1; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccLy1WGj.o:(.bss+0x0): multiple definition of `s'; /tmp/ccsRJ9tn.o:(.bss+0x20): first defined here
collect2: error: ld returned 1 exit status