# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
65950 | vsv21gml | Art Class (IOI13_artclass) | C++14 | 122 ms | 3632 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<string>
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
int i, j, dif = 0;
for (i = 1; i < H - 1; i++) {
for (j = 1; j < W - 1; j++) {
dif += abs(R[i][j] - R[i - 1][j]);
dif += abs(R[i][j] - R[i][j - 1]);
dif += abs(G[i][j] - G[i - 1][j]);
dif += abs(G[i][j] - G[i][j - 1]);
dif += abs(B[i][j] - B[i - 1][j]);
dif += abs(B[i][j] - B[i][j - 1]);
}
}
dif = dif / H / W;
if (dif < 18) return 4;
else if (dif < 52) return 1;
else if (dif < 109) return 2;
else return 3;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |