Submission #234930

#TimeUsernameProblemLanguageResultExecution timeMemory
234930muhammad_hokimiyonArt Class (IOI13_artclass)C++14
0 / 100
86 ms3964 KiB
#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; 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 (rng() % 4 + 4) % 4 + 1; }
#Verdict Execution timeMemoryGrader output
Fetching results...