# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
575809 | enerelt14 | Art Class (IOI13_artclass) | C++14 | 49 ms | 3296 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 k=30;
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
int num=0;
for (int i=0;i<H;i++){
int q=0;
for (int j=0;j<W;j++){
if (abs(R[i][j]-R[i][0])<k && abs(G[i][j]-G[i][0])<k && abs(G[i][j]-G[i][0])<k)q++;
}
if (q*10>=W*8)num++;
}
if (num*10>=H*6)return 4;
num=0;
int nm=0;
int x, y;
for (int i=0;i<H;i++){
for (int j=0;j<W;j++){
x=min(R[i][j], min(G[i][j], B[i][j]));
y=max(R[i][j], max(G[i][j], B[i][j]));
if (x+k>=y && x>=100)nm++;
if (x*3>=y*2)num++;
}
}
if (nm*10>=H*W*6)return 3;
if (num*10>=H*W*6)return 2;
return 1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |