| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 389853 | rainboy | Art Class (IOI13_artclass) | C11 | 87 ms | 6016 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"
int abs_(int a) { return a > 0 ? a : -a; }
int style(int n, int m, int rr[500][500], int gg[500][500], int bb[500][500]) {
int i, j;
double contrast;
contrast = 0;
for (i = 0; i < n; i++)
for (j = 1; j < m; j++)
contrast += abs_(rr[i][j] - rr[i][j - 1]) + abs_(gg[i][j] - gg[i][j - 1]) + abs_(bb[i][j] - bb[i][j - 1]);
for (i = 1; i < n; i++)
for (j = 0; j < m; j++)
contrast += abs_(rr[i][j] - rr[i - 1][j]) + abs_(gg[i][j] - gg[i - 1][j]) + abs_(bb[i][j] - bb[i - 1][j]);
contrast /= n * m;
return contrast < 20 ? 4 : (contrast >= 100 ? 3 : 1);
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
