제출 #595047

#제출 시각아이디문제언어결과실행 시간메모리
595047pakhomovee미술 수업 (IOI13_artclass)C++17
컴파일 에러
0 ms0 KiB
#include "artclass.h" int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) { int countGreen = 0; for (int i = 0; i < H; ++i) { for (int j = 0; j < W; ++j) { if (G[i][j] > max(R[i][h], B[i][j])) { ++countGreen; } } } if (countGreen >= 0.75 * H * W) { return 2; } return 1; }

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

artclass.cpp: In function 'int style(int, int, int (*)[500], int (*)[500], int (*)[500])':
artclass.cpp:7:36: error: 'h' was not declared in this scope
    7 |             if (G[i][j] > max(R[i][h], B[i][j])) {
      |                                    ^
artclass.cpp:7:27: error: 'max' was not declared in this scope
    7 |             if (G[i][j] > max(R[i][h], B[i][j])) {
      |                           ^~~