제출 #117710

#제출 시각아이디문제언어결과실행 시간메모리
117710GioChkhaidze미술 수업 (IOI13_artclass)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "artclass.h" using namespace std; int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) { return 3; int S=H*W; for (int i=0; i<H; i++) for (int j=0; j<W; j++) { int Mx=max(max(R[i][j],G[i][j]),B[i][j]); if (Mx!=G[i][j]) continue; if (G[i][j]-max(R[i][j],B[i][j])>=30) Green++; } if (Green>S/3) return 3; return 2; }

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

artclass.cpp: In function 'int style(int, int, int (*)[500], int (*)[500], int (*)[500])':
artclass.cpp:18:50: error: 'Green' was not declared in this scope
            if (G[i][j]-max(R[i][j],B[i][j])>=30) Green++;
                                                  ^~~~~
artclass.cpp:18:50: note: suggested alternative: 'free'
            if (G[i][j]-max(R[i][j],B[i][j])>=30) Green++;
                                                  ^~~~~
                                                  free
artclass.cpp:21:8: error: 'Green' was not declared in this scope
    if (Green>S/3) return 3;
        ^~~~~
artclass.cpp:21:8: note: suggested alternative: 'free'
    if (Green>S/3) return 3;
        ^~~~~
        free