제출 #739356

#제출 시각아이디문제언어결과실행 시간메모리
739356grossly_overconfident미술 수업 (IOI13_artclass)C++17
47 / 100
53 ms3696 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 bright = 0, black = 0, white = 0, green = 0, yellow = 0; for (int i = 0; i < h; ++i){ for (int j = 0; j < w; ++j){ if (max(max(g[i][j], r[i][j]), b[i][j]) > 130 && min(min(g[i][j], r[i][j]), b[i][j]) < 65){ bright += 1; } if (g[i][j] > r[i][j] && g[i][j] > b[i][j] + 30){ green += 1; } if (g[i][j] > b[i][j] + 30 && r[i][j] > b[i][j] + 30){ yellow += 1; } if (r[i][j] > 200 && g[i][j] > 200 && b[i][j] > 200){ white += 1; } if (r[i][j] < 50 && g[i][j] < 50 && b[i][j] < 50){ black += 1; } } } //cout << bright << endl << black << endl << white << endl << green << endl << yellow << endl; int t = h * w; if (bright > t / 2 && white < t / 4){ return 4; } if (green + yellow / 2 > t / 5 && green > 3000){ return 2; } if (white > t / 4 && (black > t / 10 || bright > t / 15)){ return 1; } return 3; }
#Verdict Execution timeMemoryGrader output
Fetching results...