제출 #937792

#제출 시각아이디문제언어결과실행 시간메모리
937792Ludissey미술 수업 (IOI13_artclass)C++14
2 / 100
44 ms3476 KiB
#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 timeMemoryGrader output
Fetching results...