Submission #121680

#TimeUsernameProblemLanguageResultExecution timeMemory
121680ly20Art Class (IOI13_artclass)C++17
Compilation error
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; }

Compilation message (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[][])
                                 ^~~