제출 #120947

#제출 시각아이디문제언어결과실행 시간메모리
120947Rahul코알라 (APIO17_koala)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define SZ(v) int((v).size()) #define ALL(vec) (vec).begin(),(vec).end() int B[500], R[500]; int minValue(int n, int w) { for (int i = 0; i < 100; ++i) { B[i] = i < 51; } playRound(B, R); int m = -1; for (int i = 0; i < 51; ++i) { if (R[i] == 0) { m = i; } else assert (R[i] == 2); } for (int i = 0; i < 100; ++i) { B[i] = i >= 50; } B[m] = 1; if (m == 50) B[49] = 1; playRound(B, R); int res = -1; for (int i = 50; i < 100; ++i) { if (R[i] == 0) { res = i; } else assert (R[i] == 2); } if (res != -1) return res; if (m == 50) return 49; else return m; } int maxValue(int n, int w) { return 0; } int greaterValue(int n, int w) { return 0; } int allValues(int n, int w, int *P) { return 0; }

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

koala.cpp: In function 'int minValue(int, int)':
koala.cpp:11:3: error: 'playRound' was not declared in this scope
   playRound(B, R);
   ^~~~~~~~~
koala.cpp:11:3: note: suggested alternative: 'lround'
   playRound(B, R);
   ^~~~~~~~~
   lround