제출 #1179043

#제출 시각아이디문제언어결과실행 시간메모리
1179043Ahmed_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 void playRound(vector<int>&b,vector<int>&r){ for(auto &elt : b) cout << elt << ' '; cout << endl; for(auto &elt : r) cin>> elt; } 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 maxValue(int, int)':
koala.cpp:38:1: warning: no return statement in function returning non-void [-Wreturn-type]
   38 | }
      | ^
koala.cpp: In function 'bool greaterValue(int, int)':
koala.cpp:42:1: warning: no return statement in function returning non-void [-Wreturn-type]
   42 | }
      | ^
koala.cpp: In function 'int minValue(int, int)':
koala.cpp:34:1: warning: control reaches end of non-void function [-Wreturn-type]
   34 | }
      | ^
/usr/bin/ld: /tmp/ccuogbR7.o: in function `runGame(int)':
grader.cpp:(.text+0x191): undefined reference to `allValues(int, int, int*)'
collect2: error: ld returned 1 exit status