# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
765268 | Sohsoh84 | 미술 수업 (IOI13_artclass) | C++17 | 70 ms | 8960 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "artclass.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef long double ld;
#define X first
#define Y second
#define sep ' '
#define debug(x) cerr << #x << ": " << x << endl;
const ll MAXN = 500;
const ld GRTRFACTOR = 0.6;
int n, m, R[MAXN][MAXN], G[MAXN][MAXN], B[MAXN][MAXN];
inline bool green_tree_detector() {
ld ans = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
if (G[i][j] > max(B[i][j], R[i][j]) * 0.6)
ans = ans + 1;
}
}
debug(ans / (n * m))
return ans / (n * m) > GRTRFACTOR;
}
int style(int H_, int W_, int R_[500][500], int G_[500][500], int B_[500][500]) {
n = H_;
m = W_;
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
R[i][j] = R_[i][j], G[i][j] = G_[i][j], B[i][j] = B_[i][j];
if (green_tree_detector()) return 2;
return 3;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |