Submission #97589

#TimeUsernameProblemLanguageResultExecution timeMemory
97589georgerapeanu미술 수업 (IOI13_artclass)C++11
0 / 100
108 ms4864 KiB
#include "artclass.h"

int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
     
    double num = 0;

    for(int i = 0;i < H;i++){
        for(int j = 0;j < W;j++){
            if(R[i][j] < G[i][j] && G[i][j] > B[i][j]){
                num += (G[i][j] - B[i][j]) / 256.0;
            }
            else if(G[i][j] <= R[i][j] && R[i][j] > B[i][j]){
                num += (R[i][j] - B[i][j]) / 512.0;
            }
        }
    } 

    if(num >= 0.75 * H * W){
        return 2;
    }

    return 3;
}
#Verdict Execution timeMemoryGrader output
Fetching results...