Submission #61281

#TimeUsernameProblemLanguageResultExecution timeMemory
61281dukati8Art Class (IOI13_artclass)C++14
Compilation error
0 ms0 KiB
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) { //Check sum of all pixels double totr,totb,totg; totr=0;totb=0;totg=0; rep (i,0,H) { rep (j,0,W) { totr+=R[i][j]; totb+=B[i][j]; totg+=G[i][j]; } } totr/=H*W; totb/=H*W; totg/=H*W; //cout << totr << " " << totg << " " << totb<<endl; if (totb<totg && totb<totr) { //probably class 2 return 2; } //Check for 10*10 square that is relatively white return 1; }

Compilation message (stderr)

artclass.cpp: In function 'int style(int, int, int (*)[500], int (*)[500], int (*)[500])':
artclass.cpp:6:8: error: 'i' was not declared in this scope
   rep (i,0,H) {
        ^
artclass.cpp:6:3: error: 'rep' was not declared in this scope
   rep (i,0,H) {
   ^~~