# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
420021 | Ozy | Art Class (IOI13_artclass) | C++17 | 86 ms | 10540 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;
#define rep(i,a,b) for (int i = (a); i <= (b); i++)
#define repa(i,a,b) for (int i = (a); i >= (b); i--)
#define lli long long int
#define debugsl(a) cout << #a << " = " << a << ", "
#define debug(a) cout << #a << " = " << a << endl
lli verdes,rojos,azules,num,a;
unordered_map<lli,lli> colores;
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
rep(i,0,H-1) {
rep(j,0,W-1) {
if (R[i][j] > G[i][j] && R[i][j] > B[i][j]) rojos++;
else if (B[i][j] > G[i][j] && B[i][j] > R[i][j]) azules++;
else verdes++;
a = R[i][j] + (1000 * B[i][j]) + (1000000 *G[i][j]);
if (colores[a] == 0) num++;
colores[a] = 1;
}
}
if (num < 50) return 1;
if (verdes > rojos && verdes > azules) return 2;
if (rojos > verdes && rojos > azules) return 4;
return 3;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |