제출 #491598

#제출 시각아이디문제언어결과실행 시간메모리
491598dxz05Art Class (IOI13_artclass)C++14
8 / 100
86 ms3664 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]}) >= 160) white++; if (G[i][j] >= max(R[i][j], B[i][j])) green++; } } int x = H * W; // cout << 100.0 * green / x << endl; if (green >= 0.50 * x) return 2; if (white >= 0.05 * x) return 1; if (green >= 0.25 * x) return 2; return 4; }
#Verdict Execution timeMemoryGrader output
Fetching results...