| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 8037 | gs13105 | 미술 수업 (IOI13_artclass) | C++98 | 140 ms | 3708 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "artclass.h"
inline int ab(int a)
{
return a<0?-a:a;
}
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500])
{
int s=0,c=0,i,j;
double t;
for(i=1;i<H;i++)
{
c++;
s+=ab(R[i][0]-R[i-1][0]);
s+=ab(G[i][0]-G[i-1][0]);
s+=ab(B[i][0]-B[i-1][0]);
}
for(i=1;i<W;i++)
{
c++;
s+=ab(R[0][i]-R[0][i-1]);
s+=ab(G[0][i]-G[0][i-1]);
s+=ab(B[0][i]-B[0][i-1]);
}
for(i=1;i<H;i++)
{
for(j=1;j<W;j++)
{
c++;
s+=ab(R[i][j]-R[i-1][j]);
s+=ab(G[i][j]-G[i-1][j]);
s+=ab(B[i][j]-B[i-1][j]);
c++;
s+=ab(R[i][j]-R[i][j-1]);
s+=ab(G[i][j]-G[i][j-1]);
s+=ab(B[i][j]-B[i][j-1]);
}
}
t=(double)s/c;
if(t>=55)
return 3;
if(t>=24)
return 2;
if(t>=9)
return 1;
return 4;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
