# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
739356 | grossly_overconfident | Art Class (IOI13_artclass) | C++17 | 53 ms | 3696 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, 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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |