Submission #234931

#TimeUsernameProblemLanguageResultExecution timeMemory
234931muhammad_hokimiyonArt Class (IOI13_artclass)C++14
0 / 100
78 ms3328 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( R[i][j] + G[i][j] + B[i][j] > 700 )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()); if( rng() % 2 )return 3; return 4; }
#Verdict Execution timeMemoryGrader output
Fetching results...