# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
155294 | jhnah917 | Art Class (IOI13_artclass) | C++14 | 95 ms | 6152 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]){
int sum = 0;
for(int i=0; i<h-1; i++){
for(int j=0; j<w-1; j++){
sum += abs(r[i+1][j] - r[i][j]);
sum += abs(r[i][j+1] - r[i][j]);
sum += abs(g[i+1][j] - g[i][j]);
sum += abs(g[i][j+1] - g[i][j]);
sum += abs(b[i+1][j] - b[i][j]);
sum += abs(b[i][j+1] - b[i][j]);
}
}
sum /= h*w;
if(sum < 18) return 4;
if(sum < 46) return 1;
if(sum < 108) return 2;
return 3;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |