# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
125446 | MoNsTeR_CuBe | Art Class (IOI13_artclass) | C++17 | 85 ms | 4728 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;
#define double long double
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
double totA = 0, totB = 0, totC = 0;
int maxA = 0, maxB = 0, maxC = 0;
int minA = INT_MAX, minB = INT_MAX, minC = INT_MAX;
for(int i = 0; i < H; i++){
for(int j = 0; j < W; j++){
totA+=R[i][j];
totB+=G[i][j];
totC+=B[i][j];
maxA = max(maxA, R[i][j]);
maxB = max(maxB, G[i][j]);
maxC = max(maxC, B[i][j]);
minA = min(minA, R[i][j]);
minB = min(minB, G[i][j]);
minC = min(minC, B[i][j]);
}
}
if(minA || minB || minC){
return 4;
}
if(maxA >= 249 && maxB >= 249 && maxC >= 249) return 1;
return rand()%2+2;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |