제출 #491591

#제출 시각아이디문제언어결과실행 시간메모리
491591dxz05Art Class (IOI13_artclass)C++14
9 / 100
62 ms3300 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 white = 0, green = 0;
    for (int i = 0; i < H; i++){
        for (int j = 0; j < W; j++){
            if (min({R[i][j], G[i][j], B[i][j]}) >= 200) white++;
            if (G[i][j] >= max(R[i][j], B[i][j])) green++;
        }
    }

    int x = H * W;

//    cout << 100.0 * green / x << endl;

    if (white >= 0.05 * x) return 1;
    if (green >= 0.25 * x) return 2;
    return 4;
}
#Verdict Execution timeMemoryGrader output
Fetching results...