# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
268432 | Toirov_Sadi | Art Class (IOI13_artclass) | C++17 | 102 ms | 3712 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 style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
srand(time(NULL));
vector<int> cnt(5);
for(int i = 0; i < H; i ++){
for(int j = 0; j < W; j ++){
if(R[i][j] >= max(G[i][j], B[i][j])) cnt[1] ++;
if(G[i][j] >= max(R[i][j], B[i][j])) cnt[2] ++;
if(B[i][j] >= max(R[i][j], G[i][j])) cnt[3] ++;
}
}
if(cnt[2] >= max(cnt[1], cnt[3])) return 2;
if(max({cnt[1], cnt[2], cnt[3]}) > (H * W) / 3) return 4;
return (rand() % 2) + 1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |