Submission #65936

#TimeUsernameProblemLanguageResultExecution timeMemory
65936vsv21gmlArt 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]) { int style, number; int avg[3], dif = 0; int GCnt = 0; for (int i = 1; i < H - 1; i++) { for (int j = 1; j < W - 1; j++) { avg[0] = (R[i - 1][j - 1] + R[i - 1][j] + R[i - 1][j + 1] + R[i][j - 1] + R[i][j] + R[i][j + 1] + R[i + 1][j - 1] + R[i + 1][j] + R[i + 1][j + 1]) / 9 - R[i][j]; avg[1] = (G[i - 1][j - 1] + G[i - 1][j] + G[i - 1][j + 1] + G[i][j - 1] + G[i][j] + G[i][j + 1] + G[i + 1][j - 1] + G[i + 1][j] + G[i + 1][j + 1]) / 9 - G[i][j]; avg[2] = (B[i - 1][j - 1] + B[i - 1][j] + B[i - 1][j + 1] + B[i][j - 1] + B[i][j] + B[i][j + 1] + B[i + 1][j - 1] + B[i + 1][j] + B[i + 1][j + 1]) / 9 - B[i][j]; if (avg[0] < 0) avg[0] *= -1; if (avg[1] < 0) avg[1] *= -1; if (avg[2] < 0) avg[2] *= -1; dif += (avg[0] + avg[1] + avg[2]); GCnt += (R[i][j] - G[i][j] - B[i][j]); } } if (dif < 999999) return 4; if (GCnt > -15000000) return 2; return 1; }

Compilation message (stderr)

artclass.cpp: In function 'int style(int, int, int (*)[500], int (*)[500], int (*)[500])':
artclass.cpp:2:6: warning: unused variable 'style' [-Wunused-variable]
    2 |  int style, number;
      |      ^~~~~
artclass.cpp:2:13: warning: unused variable 'number' [-Wunused-variable]
    2 |  int style, number;
      |             ^~~~~~
/tmp/ccwlhtNw.o: In function `main':
grader.c:(.text.startup+0x213): undefined reference to `style'
collect2: error: ld returned 1 exit status