Submission #1174493

#TimeUsernameProblemLanguageResultExecution timeMemory
1174493LithaniumArt Class (IOI13_artclass)C++20
100 / 100
43 ms3312 KiB
#include <bits/stdc++.h> #include "artclass.h" using namespace std; int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) { double stuff = 0; for (int i = 0; i < H; i ++) { for (int j = 0; j < W; j ++) { if (i) stuff += abs(R[i][j] - R[i-1][j]) + abs(G[i][j] - G[i-1][j]) + abs(B[i][j] - B[i-1][j]); if (j) stuff += abs(R[i][j] - R[i][j-1]) + abs(G[i][j] - G[i][j-1]) + abs(B[i][j] - B[i][j-1]); } } stuff /= (double)H*W - H - W + 1; if (stuff < 20) return 4; else if (stuff < 46) return 1; else if (stuff < 105) return 2; else return 3; }
#Verdict Execution timeMemoryGrader output
Fetching results...