# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
161973 | mrtsima22 | Art Class (IOI13_artclass) | C++17 | 0 ms | 0 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 "grader.h"
#include<bits/stdc++.h>
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
long long sm=0;
for(int i=0;i<H;i++){
for(int j=1;j<W;j++){
sm+=abs(R[i][j]-R[i][j-1]+1)*10LL+
abs(G[i][j]-G[i][j-1]+1)*10LL+
abs(B[i][j]-B[i][j-1]+1)*10LL;
}
}
sm/=(H*(W-1));
if(sm<=90){
return 4;
}else if(sm<=230){
return 1;
}else if(sm<=540){
return 2;
}else return 3;
}