# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
937792 | Ludissey | 미술 수업 (IOI13_artclass) | C++14 | 44 ms | 3476 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "artclass.h"
#include <bits/stdc++.h>
using namespace std;
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
int black=0;
int green=0;
int redyellow=0;
for (int i = 0; i < H; i++)
{
for (int j = 0; j < W; j++)
{
int r=R[i][j];
int g=G[i][j];
int b=B[i][j];
if(R[i][j]+G[i][j]+B[i][j]<60) black++;
else if(g>160&&r<g&&b<g) green++;
else if((G[i][j]+R[i][j]>255)&&B[i][j]<60) redyellow++;
}
}
cerr<<green<<" "<<black<<" "<<redyellow<<"\n";
if(black+green>(H*W)/10) return 3;
else if(black>(H*W)/30) return 1;
else if(green>(H*W)/10&&black<(H*W)/100) return 2;
else if(redyellow>(H*W)/5) return 4;
return 3;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |