# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
335601 | Joshc | Art Class (IOI13_artclass) | C++11 | 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 <cmath>
using namespace std;
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
float total = 0.0;
for (int i=0; i<H-1; i++) {
for (int j=0; j<W; j++) {
total += abs(R[i][j]-R[i+1][j])+abs(G[i][j]-G[i+1][j])+abs(B[i][j]-B[i+1][j]);
}
}
total /= (H-1)*W;
if (total < 11) return 4;
if (total < 20) return 1;
if (total < 60) return 2;
return 3;
}