Submission #739099

#TimeUsernameProblemLanguageResultExecution timeMemory
739099grossly_overconfidentArt Class (IOI13_artclass)C++17
0 / 100
52 ms3784 KiB
#include "artclass.h" int style(int h, int w, int r[500][500], int g[500][500], int b[500][500]) { int one = 0, two = 0, three = 0, four = 0; for (int i = 0; i < h; ++i){ for (int j = 0; j < w; ++j){ if (g[i][j] > r[i][j] + 50 && g[i][j] > b[i][j] + 50){ two += 1; } if (r[i][j] > 245 && g[i][j] > 245 && b[i][j] > 245){ one += 1; } if (r[i][j] > g[i][j] + 200 && r[i][j] > b[i][j] + 200){ four += 1; } if (b[i][j] > g[i][j] + 200 && b[i][j] > r[i][j] + 200){ four += 1; } } } if (one > h * w / 2){ return 1; } if (two > h * w / 2){ return 2; } if (two > h * w / 2){ return 4; } return 3; }

Compilation message (stderr)

artclass.cpp: In function 'int style(int, int, int (*)[500], int (*)[500], int (*)[500])':
artclass.cpp:4:27: warning: unused variable 'three' [-Wunused-variable]
    4 |     int one = 0, two = 0, three = 0, four = 0;
      |                           ^~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...