# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
206980 | oko | Art Class (IOI13_artclass) | C++14 | 83 ms | 3576 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<bits/stdc++.h>
#include "artclass.h"
using namespace std;
const long long mod=1e9+7;
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500])
{
int n=H,m=W,sum=0;
for(int i=0;i<n;i++)
{
for(int j=0;j<m;j++)
{
sum+=abs(R[i][j]-R[i][j-1])+abs(R[i][j]-R[i-1][j])+abs(B[i][j]-B[i][j-1])+abs(B[i][j]-B[i-1][j])+abs(G[i][j]-G[i][j-1])+abs(G[i][j]-G[i-1][j]);
}
}
sum/=n*m;
if(sum<=15)return 4;
if(sum>=105)return 3;
if(sum<=45)return 1;
return 2;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |