제출 #268408

#제출 시각아이디문제언어결과실행 시간메모리
268408Toirov_Sadi미술 수업 (IOI13_artclass)C++17
4 / 100
103 ms6136 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) / 2) return 4; return (rand() % 2) + 1; }
#Verdict Execution timeMemoryGrader output
Fetching results...