# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
201018 | gratus907 | 미술 수업 (IOI13_artclass) | C++17 | 80 ms | 3324 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "artclass.h"
#include <bits/stdc++.h>
#define colordist(x1,y1,x2,y2) (abs(R[x1][y1]-R[x2][y2])+abs(G[x1][y1]-G[x2][y2])+abs(B[x1][y1]-B[x2][y2]))
using namespace std;
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500])
{
double avg_color_dist = 0;
for (int i = 1; i<H; i++)
{
for (int j = 1; j<W; j++)
{
double a = colordist(i,j,i-1,j);
double b = colordist(i,j,i,j-1);
avg_color_dist += (a+b);
}
}
avg_color_dist /= (H*W);
if(avg_color_dist < 17) return 4;
if(avg_color_dist < 45) return 1;
if(avg_color_dist > 107) return 3;
return 2;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |