제출 #869107

#제출 시각아이디문제언어결과실행 시간메모리
869107normankr07미술 수업 (IOI13_artclass)C++17
12 / 100
43 ms3420 KiB
#include "artclass.h"
#include <bits/stdc++.h>

int style(int H, int W, int R[500][500], int G[500][500], int B[500][500])
{
    long long ans = 0;
    for (int x = 0; x < H; x++)
        for (int y = 0; y < W - 1; y++)
        {
            int grayscale1 = R[x][y] + G[x][y] + B[x][y];
            int grayscale2 = R[x][y + 1] + G[x][y + 1] + B[x][y + 1];
            ans += abs(grayscale1 - grayscale2);
        }
    ans /= (H * W);
    std::cerr << "inf: " << ans << '\n';
    if (ans < 21)
        return 1;
    if (ans < 32)
        return 2;
    if (ans < 119)
        return 3;
    return 4;
}
#Verdict Execution timeMemoryGrader output
Fetching results...