Submission #103032

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1030322019-03-28 19:34:34naoaiArt Class (IOI13_artclass)C++14
78 / 100
220 ms4964 KiB
#include "artclass.h"
#include <bits/stdc++.h>
using namespace std;
bool style4 (int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
long long val = 0;
for (int i = 0; i < H; ++ i) {
int lg = 1;
for (int j = 1; j < W; ++ j) {
if (abs(R[i][j] - R[i][j - 1]) <= 20 && abs(G[i][j] - G[i][j - 1]) <= 20 && abs(B[i][j] - B[i][j - 1]) <= 20) {
++ lg;
} else {
val += 1LL * lg * lg;
lg = 1;
}
}
val += 1LL * lg * lg;
}
if (val > 0.8 * H * W * W) {
return 1;
}
val = 0;
for (int j = 0; j < W; ++ j) {
int lg = 1;
for (int i = 1; i < H; ++ i) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...