제출 #1144655

#제출 시각아이디문제언어결과실행 시간메모리
1144655qqusayy22Broken Device (JOI17_broken_device)C++20
컴파일 에러
0 ms0 KiB
#include "Annalib.h" void Anna(int N, long long X, int K, int P[]){ if (p[0] > 150/2) { Set(0, 1); for (int i = 0; i <= 60; i++) { if (x&(1<<i)) Set(i + 1, 1); else Set(i + 1, 0); } for (int i = 61; i < N; i++) Set(i, 0); } if (p[0] >= 150/2) { Set(p[0] + 1, 1); for (int i = p[0] + 1; i < N; i++) { if (x&(1<<i)) Set(i, 1); else Set(i, 0); } for (int i = 0; i <= p[0]; i++) Set(i, 0); } }
#include "Brunolib.h" long long Bruno(int N, int A[]) { bool f = 0; long long x, cnt = 0; for (int i = 0; i < N; i++) { if (f && A[i]) x |= 1 << (i - cnt); else { f |= A[i]; cnt = i + 1; } } return x; }

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

# 1번째 컴파일 단계

Anna.cpp: In function 'void Anna(int, long long int, int, int*)':
Anna.cpp:4:9: error: 'p' was not declared in this scope
    4 |     if (p[0] > 150/2) {
      |         ^
Anna.cpp:7:17: error: 'x' was not declared in this scope
    7 |             if (x&(1<<i)) Set(i + 1, 1);
      |                 ^
Anna.cpp:11:11: error: 'p' was not declared in this scope
   11 |     } if (p[0] >= 150/2) {
      |           ^
Anna.cpp:14:17: error: 'x' was not declared in this scope
   14 |             if (x&(1<<i)) Set(i, 1);
      |                 ^