제출 #493621

#제출 시각아이디문제언어결과실행 시간메모리
493621Jeff12345121Brperm (RMI20_brperm)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "bperm.h" using namespace std; const int nmax = 100005; int n; char c[nmax]; void init(int N, const char C[]) { n = N; for (int i = 0; i < N; i++) { c[i] = C[i]; } } int rev(int x, int k) { int res = 0,cnt = 0; for (int i = k - 1; i >= 0; i--) { if (x & (1 << i)) res += (1 << cnt); cnt++; } return res; } int query(int i, int k) { if (i + (1 << k) - 1 >= n) return 0; int limit = i + (1 << k) - 1; for (int j = i; j <= limit; j++) { if (c[j] != c[rev(j - i , k) + i]) return 0; } return 1; }

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

brperm.cpp:2:10: fatal error: bperm.h: No such file or directory
    2 | #include "bperm.h"
      |          ^~~~~~~~~
compilation terminated.