답안 #111420

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
111420 2019-05-15T10:41:45 Z Segtree 코알라 (APIO17_koala) C++14
컴파일 오류
0 ms 0 KB
#include<iostream>
#include<algorithm>
#include"koala.h"
using namespace std;
typedef long long ll;
int B[110],R[110];
int minValue(int N,int W){
    for(int i=1;i<N;i++)B[i]=0; B[0]=1;
    playRound(B,R);
    for(int i=0;i<N;i++){
	if(R[i]==0)return i;
    }
}
int maxValue(int N,int W){
    
}
int greaterValue(int N,int W){
    
}
int allValues(int N,int W,int P){
    
}
/*
int main(){
    
    return 0;
}*/

Compilation message

koala.cpp: In function 'int minValue(int, int)':
koala.cpp:8:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
     for(int i=1;i<N;i++)B[i]=0; B[0]=1;
     ^~~
koala.cpp:8:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
     for(int i=1;i<N;i++)B[i]=0; B[0]=1;
                                 ^
koala.cpp: In function 'int maxValue(int, int)':
koala.cpp:16:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
koala.cpp: In function 'int greaterValue(int, int)':
koala.cpp:19:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
koala.cpp: In function 'int allValues(int, int, int)':
koala.cpp:22:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
koala.cpp: In function 'int minValue(int, int)':
koala.cpp:13:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/tmp/ccO9sLXI.o: In function `runGame(int)':
grader.cpp:(.text+0x16b): undefined reference to `allValues(int, int, int*)'
collect2: error: ld returned 1 exit status