Submission #56463

#TimeUsernameProblemLanguageResultExecution timeMemory
56463alenam0161Art Class (IOI13_artclass)C++17
9 / 100
137 ms3608 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>=(H*W)/4)return 1; if(gr>=0)return 2; else if(wh>-50)return 4; else return 3; }
#Verdict Execution timeMemoryGrader output
Fetching results...