# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
739328 | grossly_overconfident | Art Class (IOI13_artclass) | C++17 | 64 ms | 3540 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |