#include <bits/stdc++.h>
#include "artclass.h"
using namespace std;
#define ll long long
#define fi first
#define se second
#define pb push_back
#define vi vector<int>
#define vl vector<ll>
#define pi pair<int, int>
#define pl pair<ll,ll>
#define all(x) (x).begin(),(x).end()
bool is_green(array<int,3> a) {
return a[1]>max(a[0],a[2]);
}
int style(int h, int w, int r[500][500], int g[500][500], int b[500][500]) {
int green=0;
for (int i=0; i<h; i++) {
for (int j=0; j<w; j++) {
green+=is_green({r[i][j],g[i][j],b[i][j]});
}
}
if (green>h*w/5) {
return 2;
}
return 1;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |