# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
39196 | faustaadp | Art Class (IOI13_artclass) | C++14 | 157 ms | 3692 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>
#define ll long long
#define pb push_back
#define mp make_pair
#define fi first
#define se second
using namespace std;
ll re,ge,be,i,j,h1;
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
for(i=0;i<H;i++)
{
for(j=0;j<W-1;j++)
{
re+=R[i][j];
ge+=G[i][j];
be+=B[i][j];
if(abs(R[i][j]-R[i][j+1])+abs(G[i][j]-G[i][j+1])+abs(B[i][j]-B[i][j+1])<10)
h1++;
}
}
//cout<<ge<<" "<<re<<" "<<be<<"\n";
if(h1>=H*W/2)
return 4;
if(ge>(re+be)/2)
return 2;
return 3;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |