Submission #1174485

#TimeUsernameProblemLanguageResultExecution timeMemory
1174485LithaniumArt Class (IOI13_artclass)C++20
10 / 100
33 ms3320 KiB
#include <bits/stdc++.h> #include "artclass.h" using namespace std; int dt[505][505]; int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) { double stuff = 0; for (int i = 1; i <= H; i ++) { for (int j = 1; j <= W; j ++) { if (i > 1) 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 > 1) 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...