제출 #354773

#제출 시각아이디문제언어결과실행 시간메모리
354773talant117408미술 수업 (IOI13_artclass)C++17
25 / 100
175 ms9180 KiB
#include "artclass.h" #ifndef EVAL #include "grader.cpp" #endif #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair <int, int> pii; typedef pair <ll, ll> pll; #define precision(n) fixed << setprecision(n) #define pb push_back #define ub upper_bound #define lb lower_bound #define mp make_pair #define eps (double)1e-9 #define PI 2*acos(0.0) #define endl "\n" #define sz(v) int((v).size()) #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() #define do_not_disturb ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define OK cout << "OK" << endl; int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]){ int green = 0, white = 0; set <int> st; for(int i = 0; i < H; i++){ for(int j = 0; j < W; j++){ st.insert(256*256*R[i][j]+256*G[i][j]+B[i][j]); if(G[i][j] > R[i][j] && G[i][j] > B[i][j]){ green++; } if(min(G[i][j], min(R[i][j], B[i][j])) > 175) white++; } } if(white >= W*H*0.3) return 1; if(sz(st) > min(H, W)*min(H, W)/2) return 3; if(green >= W*H/.3) return 2; return 4; }
#Verdict Execution timeMemoryGrader output
Fetching results...