제출 #575809

#제출 시각아이디문제언어결과실행 시간메모리
575809enerelt14미술 수업 (IOI13_artclass)C++14
0 / 100
49 ms3296 KiB
#include "artclass.h" #include<bits/stdc++.h> using namespace std; int k=30; int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) { int num=0; for (int i=0;i<H;i++){ int q=0; for (int j=0;j<W;j++){ if (abs(R[i][j]-R[i][0])<k && abs(G[i][j]-G[i][0])<k && abs(G[i][j]-G[i][0])<k)q++; } if (q*10>=W*8)num++; } if (num*10>=H*6)return 4; num=0; int nm=0; int x, y; for (int i=0;i<H;i++){ for (int j=0;j<W;j++){ x=min(R[i][j], min(G[i][j], B[i][j])); y=max(R[i][j], max(G[i][j], B[i][j])); if (x+k>=y && x>=100)nm++; if (x*3>=y*2)num++; } } if (nm*10>=H*W*6)return 3; if (num*10>=H*W*6)return 2; return 1; }
#Verdict Execution timeMemoryGrader output
Fetching results...