| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 64545 | TadijaSebez | Art Class (IOI13_artclass) | C++11 | 131 ms | 62236 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 <stdio.h>
const int N=500;
int max(int a, int b){ return a>b?a:b;}
int min(int a, int b){ return a>b?b:a;}
int style(int n, int m, int r[N][N], int g[N][N], int b[N][N])
{
int i,j,green=0,yellow=0,gray=0,white=0;
for(i=0;i<n;i++)
{
for(j=0;j<m;j++)
{
if(min(r[i][j],min(g[i][j],b[i][j]))>=200) white++;
else if(min(r[i][j],min(g[i][j],b[i][j]))>100 && max(r[i][j],max(g[i][j],b[i][j]))<150) gray++;
else if(g[i][j]>200 && r[i][j]<50 && b[i][j]<50) green++;
else if(g[i][j]>160 && b[i][j]>160 && r[i][j]<50) yellow++;
}
}
int Max=max(max(green,yellow),max(gray,white));
if(Max==gray) return 3;
if(Max==white) return 1;
if(Max==green) return 2;
if(Max==yellow) return 4;
return 1;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
