# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
103032 | naoai | Art Class (IOI13_artclass) | C++14 | 220 ms | 4964 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;
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) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |