제출 #427117

#제출 시각아이디문제언어결과실행 시간메모리
427117AmineWeslati미술 수업 (IOI13_artclass)C++14
7 / 100
94 ms3780 KiB
#include "artclass.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int>vi; #define pb push_back #define sz(v) (int)v.size() typedef pair<int,int>pi; #define fi first #define se second typedef vector<pi>vpi; #define eb emplace_back #define FOR(i,a,b) for(int i=a; i<b; i++) #define ROF(i,a,b) for(int i=b-1; i>=a; i--) void ckmax(int &x, int y){x=max(x,y);} void ckmin(int &x, int y){x=min(x,y);} const int MX=1e5+10; //----------------------------- int style(int N, int M, int R[500][500], int G[500][500], int B[500][500]) { int cnt=0; FOR(i,0,N) FOR(j,0,M){ if(G[i][j]>R[i][j] && G[i][j]>B[i][j]) cnt++; } if(cnt>=(N*M)/2) return 2; cnt=0; int r=0,g=0; FOR(i,0,N) FOR(j,0,M){ r+=R[i][j]; g+=G[i][j]; if(R[i][j]>B[i][j] && R[i][j]>G[i][j]) cnt++; } if(cnt>=(N*M)/2){ if(r/g>=3) return 4; return 3; } return 1; }
#Verdict Execution timeMemoryGrader output
Fetching results...