제출 #1179035

#제출 시각아이디문제언어결과실행 시간메모리
1179035Ahmed_Kaaniche코알라 (APIO17_koala)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define ll long long #define fi first #define se second #define pb push_back int minValue(int N, int W) { vector<int>B(100, 0); vector<int>R(100); B[0]=1; playRound(B, R); if (R[0] <= 1) return 0; else{ for (int i = 0; i < N; ++i) { if(R[i] == 0) return i; } } } int maxValue(int N, int W) { } bool greaterValue(int N, int W) { } void allValues(int N, int W, vector<int> &P) { }

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

koala.cpp: In function 'int minValue(int, int)':
koala.cpp:16:5: error: 'playRound' was not declared in this scope; did you mean 'lround'?
   16 |     playRound(B, R);
      |     ^~~~~~~~~
      |     lround
koala.cpp: In function 'int maxValue(int, int)':
koala.cpp:30:1: warning: no return statement in function returning non-void [-Wreturn-type]
   30 | }
      | ^
koala.cpp: In function 'bool greaterValue(int, int)':
koala.cpp:34:1: warning: no return statement in function returning non-void [-Wreturn-type]
   34 | }
      | ^
koala.cpp: In function 'int minValue(int, int)':
koala.cpp:26:1: warning: control reaches end of non-void function [-Wreturn-type]
   26 | }
      | ^