제출 #673072

#제출 시각아이디문제언어결과실행 시간메모리
673072Dan4Life코알라 (APIO17_koala)C++17
컴파일 에러
0 ms0 KiB
#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.
    }
}

컴파일 시 표준 에러 (stderr) 메시지

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