Submission #56462

#TimeUsernameProblemLanguageResultExecution timeMemory
56462alenam0161Art Class (IOI13_artclass)C++17
6 / 100
134 ms3628 KiB
#include "artclass.h"
#include <bits/stdc++.h>
using namespace std;
int hwall[1000];
int gr;
int wh;
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
    for(int i=0;i<H;++i)
        for(int j=0;j<W;++j){
            int x=R[i][j]+G[i][j]+B[i][j];
            hwall[x]++;
            if(G[i][j]+30>R[i][j]&&B[i][j]-25<G[i][j]){
                gr++;
            }
            else{
                gr--;
            }
            if(max(G[i][j],min(B[i][j],G[i][j]))-min(G[i][j],min(B[i][j],G[i][j]))<25){
                wh++;
            }
            else{
                wh--;
            }
        }
    if(wh>=0)return 1;
    if(gr>=0)return 2;
    else if(wh>-50)return 4;
    else return 3;
}
#Verdict Execution timeMemoryGrader output
Fetching results...