# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
937792 | Ludissey | Art Class (IOI13_artclass) | C++14 | 44 ms | 3476 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"
#include <bits/stdc++.h>
using namespace std;
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++)
{
int r=R[i][j];
int g=G[i][j];
int b=B[i][j];
if(R[i][j]+G[i][j]+B[i][j]<60) black++;
else if(g>160&&r<g&&b<g) green++;
else if((G[i][j]+R[i][j]>255)&&B[i][j]<60) redyellow++;
}
}
cerr<<green<<" "<<black<<" "<<redyellow<<"\n";
if(black+green>(H*W)/10) return 3;
else if(black>(H*W)/30) return 1;
else if(green>(H*W)/10&&black<(H*W)/100) return 2;
else if(redyellow>(H*W)/5) return 4;
return 3;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |