# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
17221 | murat | Art Class (IOI13_artclass) | C++98 | 152 ms | 3716 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 all = 0, sc = 0;
for(int i = 0; i < H; i++)
for(int j = 0; j < W; j++) {
if(j < W-1) all += abs(R[i][j] - R[i][j+1]);
if(i < H-1) all += abs(R[i][j] - R[i+1][j]);
if(j < W-1) all += abs(B[i][j] - B[i][j+1]);
if(i < H-1) all += abs(B[i][j] - B[i+1][j]);
if(j < W-1) all += abs(G[i][j] - G[i][j+1]);
if(i < H-1) all += abs(G[i][j] - G[i+1][j]);
if(j < W-1) sc++;
if(i < H-1) sc++;
}
double ans = all / 1.0 / sc;
if(ans >= 56) return 3;
if(ans >= 24) return 2;
if(ans >= 9) return 1;
return 4;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |