Submission #231493

#TimeUsernameProblemLanguageResultExecution timeMemory
231493Dilshod_ImomovArt Class (IOI13_artclass)C++17
2 / 100
158 ms11896 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]) { set < pair < int, pair < int, int > > > st; for ( int i = 0; i < H; i++ ) { for ( int j = 0; j < W; j++ ) { st.insert( { R[i][j], { G[i][j], B[i][j] } } ); } } int sz = st.size(), ttl = H * W; int perc = sz / (ttl / 100); if ( perc >= 50 ) { return 3; } if ( perc >= 25 ) { return 1; } if ( perc >= 15 ) { return 2; } return 4; }
#Verdict Execution timeMemoryGrader output
Fetching results...