# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
280287 | Saboon | Art Class (IOI13_artclass) | C++14 | 138 ms | 36472 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 maxn = 500 + 10;
int cnt[256][256][256];
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
for (int i = 0; i < H; i++)
for (int j = 0; j < W; j++)
cnt[R[i][j]][G[i][j]][B[i][j]] ++;
int Green = 0, Yellow = 0;
for (int i = 0; i < 255; i++)
for (int j = 0; j < 255; j++)
for (int k = 0; k < 255; k++){
if (cnt[i][j][k] >= 1 and max({i,j,k}) == j and max({i,j,k}) - min({i,j,k}) >= 30)
Green ++;
if (cnt[i][j][k] >= 1 and max({i,j,k}) == i and max({i,j,k}) - min({i,j,j}) >= 30 and i - j <= 50)
Yellow ++;
}
if (Green > 1000 and (Green+Yellow) > H*W/10)
return 2;
return 1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |