제출 #29628

#제출 시각아이디문제언어결과실행 시간메모리
29628aybala미술 수업 (IOI13_artclass)C++11
컴파일 에러
0 ms0 KiB
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) { h=H; w=W; int g=0,r=0,b=0; fori(i,0,h){ fori(j,0,w){ r+=R[i][j]; g+=G[i][j]; b+=B[i][j]; } } if(g>=r && g>=b) return 2; return 4; }

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

artclass.cpp: In function 'int style(int, int, int (*)[500], int (*)[500], int (*)[500])':
artclass.cpp:2:2: error: 'h' was not declared in this scope
  h=H;
  ^
artclass.cpp:3:2: error: 'w' was not declared in this scope
  w=W;
  ^
artclass.cpp:5:7: error: 'i' was not declared in this scope
  fori(i,0,h){
       ^
artclass.cpp:5:2: error: 'fori' was not declared in this scope
  fori(i,0,h){
  ^~~~