# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
426554 | Aldas25 | Art Class (IOI13_artclass) | C++14 | 69 ms | 6072 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "artclass.h"
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define REP(n) FOR(O, 1, (n))
#define f first
#define s second
#define pb push_back
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vii;
typedef long long ll;
typedef vector<ll> vl;
typedef long double ld;
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
ll sumR = 0, sumG = 0, sumB = 0;
FOR(i, 0, H-1) FOR(j, 0, W-1) {
sumR += R[i][j];
sumG += G[i][j];
sumB += B[i][j];
}
//cout << " sumR = " << sumR << " sumG = " << sumG << " sumB = " << sumB << endl;
ll area = ((ll)H)*((ll)W);
ld avR = ((ld)sumR) / ((ld)area);
ld avG = ((ld)sumG) / ((ld)area);
ld avB = ((ld)sumB) / ((ld)area);
//cout << fixed << setprecision(3) << " avR = " << avR << " avG = " << avG << " avB = " << avB << endl;
int ans = 1;
if (avB < min(avR, avG) - 25.0) ans =2;
//cout << " ans = " << ans << endl;
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |