| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 129061 | dolphingarlic | Art Class (IOI13_artclass) | C++14 | 75 ms | 7160 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"
#pragma GCC Optimize("O3")
#define FOR(i, x, y) for (int i = x; i < y; i++)
#define MOD 1000000007
typedef long long ll;
using namespace std;
int a[502][502];
int style(int h, int w, int r[500][500], int g[500][500], int b[500][500]) {
FOR(i, 1, h + 1)
FOR(j, 1, w + 1)
a[i][j] = r[i - 1][j - 1] + b[i - 1][j - 1] + g[i - 1][j - 1];
FOR(i, 1, h + 1)
a[i][w + 1] = 0x7F7F7F;
FOR(i, 1, w + 1)
a[h + 1][i] = 0x7F7F7F;
double ave = 0;
FOR(i, 1, h + 1)
FOR(j, 1, w + 1) {
ave += abs(4 * a[i][j] - a[i - 1][j] - a[i + 1][j] - a[i][j - 1] - a[i][j + 1]);
}
ave /= (w * h);
if (ave < 26)
return 4;
else if (ave < 56)
return 1;
else if (ave < 160)
return 2;
else
return 3;
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
