Submission #56451

#TimeUsernameProblemLanguageResultExecution timeMemory
56451alenam0161Art Class (IOI13_artclass)C++17
10 / 100
128 ms3708 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]+R[i][j]+B[i][j]<255){ gr++; } else{ gr--; } if(G[i][j]+R[i][j]+B[i][j]>500){ wh++; } else{ wh--; } } if(gr>=0)return 2; if(wh>=0)return 1; else if(wh>-50)return 4; else return 3; }
#Verdict Execution timeMemoryGrader output
Fetching results...