Submission #231491

#TimeUsernameProblemLanguageResultExecution timeMemory
231491Dilshod_ImomovArt Class (IOI13_artclass)C++17
0 / 100
148 ms13688 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); cout << ttl << ' ' << sz << ' ' << perc << '\n'; if ( perc >= 50 ) { return 3; } if ( perc >= 25 ) { return 1; } if ( perc >= 15 ) { return 2; } return 4; }
#Verdict Execution timeMemoryGrader output
Fetching results...