Submission #1362065

#TimeUsernameProblemLanguageResultExecution timeMemory
1362065srividya_06Koala Game (APIO17_koala)C++20
Compilation error
0 ms0 KiB
#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: In function 'int minValue(int, int)':
koala.cpp:7:5: error: 'fill' was not declared in this scope
    7 |     fill(b, b+N,0);
      |     ^~~~
koala.cpp: At global scope:
koala.cpp:18:6: error: ambiguating new declaration of 'bool greaterValue(int, int)'
   18 | bool greaterValue(int N, int W){
      |      ^~~~~~~~~~~~
In file included from koala.cpp:1:
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:14:1: warning: control reaches end of non-void function [-Wreturn-type]
   14 | }
      | ^