# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
869103 | normankr07 | Art Class (IOI13_artclass) | C++17 | 5101 ms | 6152 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 "artclass.h"
#include <bits/stdc++.h>
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500])
{
long long ans = 0;
for (int x = 0; x < H; x++)
for (int y = 0; y < W - 1; x++)
{
int grayscale1 = R[x][y] + G[x][y] + B[x][y];
int grayscale2 = R[x][y + 1] + G[x][y + 1] + B[x][y + 1];
ans += abs(grayscale1 / 3 - grayscale2 / 3);
}
ans /= (H * W);
if (ans < 10)
return 4;
if (ans < 30)
return 1;
if (ans < 54)
return 2;
return 3;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |