Submission #268432

#TimeUsernameProblemLanguageResultExecution timeMemory
268432Toirov_SadiArt Class (IOI13_artclass)C++17
3 / 100
102 ms3712 KiB
#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 timeMemoryGrader output
Fetching results...