제출 #121680

#제출 시각아이디문제언어결과실행 시간메모리
121680ly20미술 수업 (IOI13_artclass)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
using namespace std;
#include"artclass.h"
int style(int H,int W,int R[][],int G[][],int B[][])
{
	int r=0,g=0,b=0;
	for(int i=0;i<H;i++)
		for(int j=0;j<W;j++)
		{
			r+=R[i][j];
			g+=G[i][j];
			b+=B[i][j];
		}
	int mg=H*W*70,md=H*W*100;
	int resp;
	if(g-mg>r && g>b-mg)resp=2;
	else if(r>b && g-mg>b)resp=4;
	else if(r>=md || g>=md/2 || b>=md)resp=1;
	else resp=3;
	return resp;
}

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

artclass.cpp:4:31: error: declaration of 'R' as multidimensional array must have bounds for all dimensions except the first
 int style(int H,int W,int R[][],int G[][],int B[][])
                               ^
artclass.cpp:4:32: error: expected ')' before ',' token
 int style(int H,int W,int R[][],int G[][],int B[][])
                                ^
artclass.cpp:4:33: error: expected unqualified-id before 'int'
 int style(int H,int W,int R[][],int G[][],int B[][])
                                 ^~~