Submission #396434

#TimeUsernameProblemLanguageResultExecution timeMemory
396434vh50Art Class (IOI13_artclass)C++17
0 / 100
67 ms3320 KiB
#include <bits/stdc++.h> #include "artclass.h" using namespace std; const int MAX = 1e5; int marc[MAX]; int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) { int r = R[0][0], g = G[0][0], b = B[0][0], c = 0; for(int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { if(abs(R[i][j] - r) < 10 && abs(G[i][j] - g) < 10 && abs(B[i][j] - b) < 10) marc[c]++; else c++; } srand(time(0)); if(c <= 6) return 4; if(c <= 10) return 1; return rand() % 2 + 2; } }

Compilation message (stderr)

artclass.cpp: In function 'int style(int, int, int (*)[500], int (*)[500], int (*)[500])':
artclass.cpp:21:1: warning: control reaches end of non-void function [-Wreturn-type]
   21 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...