Submission #1178650

#TimeUsernameProblemLanguageResultExecution timeMemory
1178650newbie__1Koala Game (APIO17_koala)C++17
Compilation error
0 ms0 KiB
#include "koala.h"
#include<bits/stdc++.h>
#define ll long long
using namespace std;

ll B[100],R[100];



ll minValue(ll n,ll w){
    for(ll i=0;i<n;i++){
        B[i]=0;
        R[i]=0;
    }
    B[0]=1;
    playRound(B,R);
    for(ll i=0;i<n;i++){
        if(R[i]==0){
            return i;
        }
    }

    return 0;
}

ll maxValue(ll n,ll w){
    // ind mx val
    return n;
}

ll greaterValue(ll n,ll w){
    // ind 0 || 1
    return n;
}

void allValues(ll n,ll w,vector<ll>& p){

    return;
}

Compilation message (stderr)

koala.cpp: In function 'long long int minValue(long long int, long long int)':
koala.cpp:16:15: error: cannot convert 'long long int*' to 'int*'
   16 |     playRound(B,R);
      |               ^
      |               |
      |               long long int*
In file included from koala.cpp:1:
koala.h:4:21: note:   initializing argument 1 of 'void playRound(int*, int*)'
    4 | void playRound(int *B, int *R);
      |                ~~~~~^