# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
434899 | QCFium | 미술 수업 (IOI13_artclass) | C++14 | 88 ms | 3232 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "artclass.h"
int ri() {
int n;
scanf("%d", &n);
return n;
}
int solve(int h, int w, int r[500][500], int g[500][500], int b[500][500]) {
const int THRESHOLD = 50;
int r0 = 0;
int r1 = 0;
for (int i = 0; i + 1 < h; i++) {
for (int j = 0; j < w; j++) {
int cur_diff = std::abs(r[i][j] - r[i + 1][j]) + std::abs(g[i][j] - g[i + 1][j]) + std::abs(b[i][j] - b[i + 1][j]);
if (cur_diff < THRESHOLD) r0 += cur_diff;
else r1 += cur_diff;
}
}
r0 = r0 * 10 / h / w;
r1 = r1 * 10 / h / w;
if (r1 <= 15) return 4;
else if (r1 >= 400) return 3;
if (r0 <= 125) return 1;
else return 2;
}
int style(int h, int w, int r[500][500], int g[500][500], int b[500][500]) {
return solve(h, w, r, g, b);
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |