| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 586852 | benjaminkleyn | 미술 수업 (IOI13_artclass) | C++17 | 93 ms | 3332 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "artclass.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int style(int h, int w, int r[500][500], int g[500][500], int b[500][500])
{
ll sumz = 0;
for (int i = 0; i < h; i++)
for (int j = 0; j < w; j++)
if (g[i][j] > r[i][j] + b[i][j])
sumz += g[i][j];
if (sumz > h * w * 100)
return 2;
ll total_offset = 0;
for (int i = 2; i < h - 2; i++)
for (int j = 2; j < w - 2; j++)
{
ll sumR = 0, sumG = 0, sumB = 0;
for (int k = i - 2; k <= i + 2; k++)
for (int l = j - 2; l <= j + 2; l++)
sumR += r[k][l], sumG += g[k][l], sumB += b[k][l];
ll offset = 0;
for (int k = i - 2; k <= i + 2; k++)
for (int l = j - 2; l <= j + 2; l++)
{
offset += abs(sumR - 25 * r[k][l]);
offset += abs(sumG - 25 * g[k][l]);
offset += abs(sumB - 25 * b[k][l]);
}
total_offset += offset / 25;
}
if (total_offset > 350000000)
return 3;
ll cnt_black = 0;
for (int i = 0; i < h; i++)
for (int j = 0; j < w; j++)
if (r[i][j] + g[i][j] + b[i][j] < 60)
cnt_black++;
if (cnt_black * 20 > h * w)
return 1;
return 4;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
