Submission #354817

#TimeUsernameProblemLanguageResultExecution timeMemory
354817kylych03Art Class (IOI13_artclass)C++14
8 / 100
141 ms9196 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, black = 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(G[i][j]+R[i][j]+B[i][j] > 600) white++; if(G[i][j]+R[i][j]+B[i][j] < 30) black++; } } if(black >= W*H*0.01) 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...