| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 64545 | TadijaSebez | Art Class (IOI13_artclass) | C++11 | 131 ms | 62236 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "artclass.h"
#include <stdio.h>
const int N=500;
int max(int a, int b){ return a>b?a:b;}
int min(int a, int b){ return a>b?b:a;}
int style(int n, int m, int r[N][N], int g[N][N], int b[N][N])
{
int i,j,green=0,yellow=0,gray=0,white=0;
for(i=0;i<n;i++)
{
for(j=0;j<m;j++)
{
if(min(r[i][j],min(g[i][j],b[i][j]))>=200) white++;
else if(min(r[i][j],min(g[i][j],b[i][j]))>100 && max(r[i][j],max(g[i][j],b[i][j]))<150) gray++;
else if(g[i][j]>200 && r[i][j]<50 && b[i][j]<50) green++;
else if(g[i][j]>160 && b[i][j]>160 && r[i][j]<50) yellow++;
}
}
int Max=max(max(green,yellow),max(gray,white));
if(Max==gray) return 3;
if(Max==white) return 1;
if(Max==green) return 2;
if(Max==yellow) return 4;
return 1;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
