# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
937780 | Ludissey | Art Class (IOI13_artclass) | C++14 | 51 ms | 6228 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "artclass.h"
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
int black=0;
int green=0;
int redyellow=0;
for (int i = 0; i < H; i++)
{
for (int j = 0; j < W; j++)
{
if(R[i][j]+G[i][j]+B[i][j]<4) black++;
else if(G[i][j]>200&&G[i][j]+B[i][j]<100) green++;
else if((R[i][j]>200||G[i][j]>100&&R[i][j]>100)&&B[i][j]<60) redyellow++;
}
}
if(black>(H*W)/30) return 1;
else if(green>(H*W)/10) return 2;
else if(redyellow>(H*W)/5) return 4;
return 3;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |