# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
351238 | Mefarnis | Art Class (IOI13_artclass) | C++14 | 0 ms | 0 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"
const double GREEN_RATIO = 0.4;
const int GREEN_LOW_GREEN = 100;
const int GREEN_GREEN_RED_DIFF = 50;
const int GREEN_GREEN_BLUE_DIFF = 50;
int style(int n, int m, int r[500][500], int g[500][500], int b[500][500]) {
int ans;
int gcnt = 0;
for( int i = 0 ; i < n ; i++ )
for( int j = 0 ; j < m ; j++ )
if(g[i] >= GREEN_LOW_GREEN && g[i]-b[i] >= GREEN_GREEN_BLUE_DIFF && g[i]-R[i] >= GREEN_GREEN_RED_DIFF)
gcnt++;
if(gcnt >= n*m*GREEN_RATIO)
ans = 2;
else
ans = 1;
return ans;
}