제출 #1207141

#제출 시각아이디문제언어결과실행 시간메모리
1207141lovrot질문 (CEOI14_question_grader)C11
컴파일 에러
0 ms0 KiB
#include <cstdio> using namespace std; namespace A { const int N = 1e3; const int LOG = 12; int mask[N]; int bitperm(int x, int k) { int ret = x + (x & -x); return ret + (1 << (k - __builtin_popcount(ret))) - 1; } void give_mask() { int x = (1 << (LOG / 2)) - 1; for(int i = 1; i <= 924; ++i) { mask[i] = x; if(i == 924) return; x = bitperm(x, LOG / 2); } } } int encode(int n, int x, int y) { using namespace A; give_mask(); for(int i = 0; i < LOG; ++i) { if(!(x & (1 << i)) && (y & (1 << i))) { return i + 1; } } return 0; }
#include <cstdio> using namespace std; namespace B { const int N = 1e3; const int LOG = 12; int mask[N]; int bitperm(int x, int k) { int ret = x + (x & -x); return ret + (1 << (k - __builtin_popcount(ret))) - 1; } void give_mask() { int x = (1 << (LOG / 2)) - 1; for(int i = 1; i <= 924; ++i) { mask[i] = x; if(i == 924) return; x = bitperm(x, LOG / 2); } } } int decode(int n, int x, int h) { using namespace B; give_mask(); return (bool) (x & (1 << (h - 1))); }

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

# 1번째 컴파일 단계

encoder.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.