제출 #335604

#제출 시각아이디문제언어결과실행 시간메모리
335604JoshcArt Class (IOI13_artclass)C++11
100 / 100
78 ms6124 KiB
#include "artclass.h"
#include <cmath>
using namespace std;
 
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
    float total = 0.0;
    for (int i=0; i<H-1; i++) {
        for (int j=0; j<W; j++) {
            total += abs(R[i][j]-R[i+1][j])+abs(G[i][j]-G[i+1][j])+abs(B[i][j]-B[i+1][j]);
        }
    }
    total /= (H-1)*W;
    if (total < 11) return 4;
    if (total < 20) return 1;
    if (total < 60) return 2;
    return 3;
}
#Verdict Execution timeMemoryGrader output
Fetching results...