제출 #876550

#제출 시각아이디문제언어결과실행 시간메모리
876550MinaRagy06Brperm (RMI20_brperm)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "brperm.h" #include "grader.cpp" using namespace std; #define ll long long int rev(int x, int k) { int y = 0; for (int i = 0; i < k; i++) { y |= ((x >> (k - 1 - i)) & 1) << i; } return y; } char a[500'005]; void init(int n, const char s[]) { for (int i = 0; i < n; i++) { a[i] = s[i]; } } int query(int i, int k) { int ok = 1; for (int j = i; j < i + (1 << k); j++) { ok &= a[rev(j - i, k) + i] == a[j]; } return ok; } // int main() { // ios_base::sync_with_stdio(0), cin.tie(0); // int k; // cin >> k; // for (int i = 0; i < (1 << k); i++) { // cout << rev(i, k) << '\n'; // } // return 0; // } //

컴파일 시 표준 에러 (stderr) 메시지

/usr/bin/ld: /tmp/cc0dLogN.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc0OMOTK.o:brperm.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/cc0dLogN.o:(.bss+0x0): multiple definition of `s'; /tmp/cc0OMOTK.o:(.bss+0x7a140): first defined here
collect2: error: ld returned 1 exit status