Submission #673072

# Submission time Handle Problem Language Result Execution time Memory
673072 2022-12-19T14:13:05 Z Dan4Life Koala Game (APIO17_koala) C++17
Compilation error
0 ms 0 KB
#include "koala.h"
#include <bits/stdc++.h>
#include "grader.cpp"
using namespace std;

int minValue(int N, int W) {
	int x[N], y[N];
	for(int i = 0; i < N; i++) x[i]=0;
	x[0]=1; playRound(x,y);
    for(int i = 0; i < N; i++) if(y[i]==0) return i;
    return 0;
}

int maxValue(int N, int W) {
    // TODO: Implement Subtask 2 solution here.
    // You may leave this function unmodified if you are not attempting this
    // subtask.
    return 0;
}

int greaterValue(int N, int W) {
    // TODO: Implement Subtask 3 solution here.
    // You may leave this function unmodified if you are not attempting this
    // subtask.
    return 0;
}

void allValues(int N, int W, int *P) {
    if (W == 2*N) {
        // TODO: Implement Subtask 4 solution here.
        // You may leave this block unmodified if you are not attempting this
        // subtask.
    } else {
        // TODO: Implement Subtask 5 solution here.
        // You may leave this block unmodified if you are not attempting this
        // subtask.
    }
}

Compilation message

In file included from koala.cpp:3:
grader.cpp: In function 'void runGame(int)':
grader.cpp:133:24: warning: ''target_mem_ref' not supported by dump_expr<expression error>' may be used uninitialized in this function [-Wmaybe-uninitialized]
  133 |             if (userP[i] != P[i]) {
      |                 ~~~~~~~^
/usr/bin/ld: /tmp/ccxYCdwT.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc8yfGkT.o:koala.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccxYCdwT.o: in function `playRound(int*, int*)':
grader.cpp:(.text+0x280): multiple definition of `playRound(int*, int*)'; /tmp/cc8yfGkT.o:koala.cpp:(.text+0x40): first defined here
collect2: error: ld returned 1 exit status