# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
235204 | crossing0ver | 미술 수업 (IOI13_artclass) | C++17 | 0 ms | 0 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<bits/stdc++.h>
//#include "artclass.h"
using namespace std;
int X[500][500][3],tot[3],mx[3],mn[3];
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++) {
X[i][j][0] = R[i][j];
X[i][j][1] = G[i][j];
X[i][j][2] = B[i][j];
}
for (int i = 0; i < H; i++)
for (int j = 0; j < W; j++)
for (int t = 0; t < 3; t++) {
tot[t] += X[i][j][t];
if (X[i][j][0] <= X[i][j][t] && X[i][j][1] <= X[i][j][t] && X[i][j][2] <= X[i][j][t])
mx[t]++;
if (X[i][j][0] >= X[i][j][t] && X[i][j][1] >= X[i][j][t] && X[i][j][2] >= X[i][j][t])
mn[t]++;
}
if (mx[1] >= mx[0] && mx[1] >= mx[2]) return 2;
for (int i = 0; i < 3; i++) {
if (2*tot[i] > (tot[0] + tot[1] + tot[2])) return 4;
}
return 3;
}
int main() {
cin >> t
}