Submission #1179035

#TimeUsernameProblemLanguageResultExecution timeMemory
1179035Ahmed_KaanicheKoala Game (APIO17_koala)C++20
Compilation error
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) {

}

Compilation message (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 | }
      | ^