# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
234929 | muhammad_hokimiyon | 미술 수업 (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"
#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 a = 0 , b = 0 , c = 0;
int t = 0;
for( int i = 0; i < H; i++ ){
for( int j = 0; j < W; j++ ){
if( R[i][j] > max(G[i][j] , B[i][j]) )a += 1;
else if( G[i][j] > max(R[i][j] , B[i][j]) )b += 1;
else if( B[i][j] > max(R[i][j] , G[i][j]) )c += 1;
else if( abs(R[i][j] - G[i][j]) <= 10 && abs(R[i][j] - B[i][j]) <= 10 )t += 1;
}
}
if( a >= max(b , c) )return 2;
if( t * 1.0 >= 1.0 * H * W * 30 / 100 )return 1;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
return (abs(rng()) % 4) + 1;
}