제출 #335601

#제출 시각아이디문제언어결과실행 시간메모리
335601Joshc미술 수업 (IOI13_artclass)C++11
컴파일 에러
0 ms0 KiB
#include <cmath>
using namespace std;

int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
    float total = 0.0;
    for (int i=0; i<H-1; i++) {
        for (int j=0; j<W; j++) {
            total += abs(R[i][j]-R[i+1][j])+abs(G[i][j]-G[i+1][j])+abs(B[i][j]-B[i+1][j]);
        }
    }
    total /= (H-1)*W;
    if (total < 11) return 4;
    if (total < 20) return 1;
    if (total < 60) return 2;
    return 3;
}

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

/tmp/cc7frEfF.o: In function `main':
grader.c:(.text.startup+0x213): undefined reference to `style'
collect2: error: ld returned 1 exit status