# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
716259 | Nonoze | 미술 수업 (IOI13_artclass) | C++14 | 73 ms | 6092 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "artclass.h"
using namespace std;
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
double compR=0, compG=0, compB=0;
double diffR=0, diffG=0, diffB=0;
for (int i = 0; i < H; ++i)
{
for (int j = 0; j < W; ++j)
{
compR+=R[i][j];
compG+=G[i][j];
compB+=B[i][j];
if (i<H-1) {
diffR+=abs(R[i][j]-R[i+1][j]);
diffG+=abs(G[i][j]-G[i+1][j]);
diffB+=abs(B[i][j]-B[i+1][j]);
}
if (j<W-1) {
diffR+=abs(R[i][j]-R[i][j+1]);
diffG+=abs(G[i][j]-G[i][j+1]);
diffB+=abs(B[i][j]-B[i][j+1]);
}
}
}
double moyenneR=(double)compR/(H*W), moyenneG=(double)compG/(H*W), moyenneB=(double)compB/(H*W);
diffR/=H*W, diffG/=H*W, diffB/=H*W;
if (diffR<6.22 || diffG<6.0 || diffB<6.1)
{
return 4;
}
if (diffR>36.8 || diffG>36.3 || diffB>35.3)
{
return 3;
}
if (moyenneR>130.0 && moyenneG>130.0 && moyenneB>130.0)
{
return 1;
}
return 2;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |