Submission #1362068

#TimeUsernameProblemLanguageResultExecution timeMemory
1362068srividya_06Koala Game (APIO17_koala)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "koala.h"
#define REP(i,a,b) for(int i = a; i<b; i++)
#define RREP(i,a,b) for(int i = a; i>b; i--)
using namespace std;
int b[100],r[100];
int minValue(int N, int W){
    fill(b, b+N,0);
    b[0] = 1;
    playRound(b,r);
    if(r[0]<=1) return 0;
    REP(i,1,N){
        if(r[i]>0) return i;
    }
}
int maxValue(int N, int W){
    return 0;
}
bool greaterValue(int N, int W){
    return 0;
}
void allValues(int N, int W, int *P){
}

Compilation message (stderr)

koala.cpp:19:6: error: ambiguating new declaration of 'bool greaterValue(int, int)'
   19 | bool greaterValue(int N, int W){
      |      ^~~~~~~~~~~~
In file included from koala.cpp:2:
koala.h:8:5: note: old declaration 'int greaterValue(int, int)'
    8 | int greaterValue(int N, int W);
      |     ^~~~~~~~~~~~
koala.cpp: In function 'int minValue(int, int)':
koala.cpp:15:1: warning: control reaches end of non-void function [-Wreturn-type]
   15 | }
      | ^