# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
56664 | hamzqq9 | Art Class (IOI13_artclass) | C++14 | 134 ms | 3656 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 way[4][2]={1,0,0,1,-1,0,0,-1};
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
double tot=0;
int total=0;
for(int i=1;i<H-1;i++) {
for(int j=1;j<W-1;j++) {
for(int w=0;w<4;w++) {
int toi=i+way[w][0];
int toj=j+way[w][1];
tot+=abs(R[toi][toj]-R[i][j]);
tot+=abs(G[toi][toj]-G[i][j]);
tot+=abs(B[toi][toj]-B[i][j]);
}
total++;
}
}
double res=tot/total;
if(tot/total>=300) return 3;
if(tot/total>=100) return 2;
if(tot/total>=50) return 1;
return 4;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |