# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
962191 | serkanrashid | Art Class (IOI13_artclass) | C++14 | 54 ms | 5968 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])
{
double avg;
double r,g,b;
r = g = b;
for(int i = 0; i < H; i++)
{
for(int j = 0; j < W; j++)
{
avg += R[i][j] + G[i][j] + B[i][j];
r += R[i][j];
g += G[i][j];
b += B[i][j];
}
}
avg /= (double)(H*W);
avg = round(avg);
if(avg<=120) return 3;
if(g>=1.5*r&&g>=1.5*b) return 2;
if(r>=2*b) return 4;
return 1;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |