# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
542980 | nayhz | Art Class (IOI13_artclass) | C++17 | 76 ms | 6076 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]) {
int total = H * (W - 1);
int change = 0;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W - 1; j++) {
change += abs(R[i][j] - R[i][j + 1]);
change += abs(G[i][j] - G[i][j + 1]);
change += abs(B[i][j] - B[i][j + 1]);
}
}
change /= total;
if (change <= 10) return 4;
else if (change <= 25) return 1;
else if (change <= 60) return 2;
else return 3;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |