제출 #739328

#제출 시각아이디문제언어결과실행 시간메모리
739328grossly_overconfident미술 수업 (IOI13_artclass)C++17
23 / 100
64 ms3540 KiB
#include "artclass.h" #include <bits/stdc++.h> using namespace std; //int style(int h, int w, vector<vector<int>> r, vector<vector<int>> g, vector<vector<int>> b) { 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; 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]) > 150 && min(min(g[i][j], r[i][j]), b[i][j]) < 75){ bright += 1; } if (g[i][j] > r[i][j] && g[i][j] > b[i][j] + 5){ green += 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; int t = h * w; if (bright > t / 2 && white < t / 4){ return 4; } if (green > t / 5){ return 2; } if (white > t / 4 && (black > t / 10 || bright > t / 10)){ return 1; } return 3; }
#Verdict Execution timeMemoryGrader output
Fetching results...