Submission #231486

#TimeUsernameProblemLanguageResultExecution timeMemory
231486Dilshod_ImomovArt Class (IOI13_artclass)C++17
0 / 100
178 ms11772 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 = (ttl / 100) * sz;
    if ( perc >= 75 ) {
    	return 3;
    }
    if ( perc >= 50 ) {
    	return 1;
    }
    if ( perc >= 25 ) {
    	return 2;
    }
    return 4;
}
#Verdict Execution timeMemoryGrader output
Fetching results...