# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
396434 | vh50 | Art Class (IOI13_artclass) | C++17 | 67 ms | 3320 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |