제출 #764009

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
7640092023-06-23 05:26:29ymm미술 수업 (IOI13_artclass)C++17
67 / 100
64 ms6136 KiB
#include "artclass.h"
#include <bits/stdc++.h>
#define Loop(x, l, r) for (ll x = (l); x < (r); ++x)
typedef long long ll;
typedef std::pair<int,int> pii;
typedef std::pair<ll ,ll > pll;
using namespace std;
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500])
{
ll sumdif = 0;
ll cntbig = 0;
Loop (i,0,H) Loop (j,0,W) {
for (auto [x, y] : {pii{0, -1}, {0, 1}, {-1, 0}, {1, 0}}) {
int ii = i+x, jj = j+y;
if (ii < 0 || H <= ii || jj < 0 || W <= jj)
continue;
int dif = 0;
for (auto X : {R, G, B})
dif += abs(X[ii][jj] - X[i][j]);
if (dif >= 32)
cntbig++;
else
sumdif += dif;
}
}
double a = (double)sumdif/(H*W);
double b = (double)cntbig/(H*W);
if (a > 35)
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...