제출 #383602

#제출 시각아이디문제언어결과실행 시간메모리
383602Keshi미술 수업 (IOI13_artclass)C++17
71 / 100
101 ms3328 KiB
//In the name of God
#include <bits/stdc++.h>
#include "artclass.h"
using namespace std;

typedef long long ll;
typedef pair<ll, ll> pll;

const ll maxn = 2e5 + 100;
const ll mod = 1e9 + 7;
const ll inf = 1e18;

#define fast_io ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define file_io freopen("input.txt", "r+", stdin);freopen("output.txt", "w+", stdout);
#define pb push_back
#define Mp make_pair
#define F first
#define S second
#define Sz(x) ll((x).size())
#define all(x) (x).begin(), (x).end()

bool ok(ll r1, ll g1, ll b1, ll r2, ll g2, ll b2){
	return (abs(r1 - r2) + abs(g1 - g2) + abs(b1 - b2) > 30);
}


int style(int h, int w, int r[500][500], int g[500][500], int b[500][500]) {
	ll t = 0;
    for(ll i = 1; i < h; i++){
		for(ll j = 1; j < w; j++){
			if(ok(r[i][j], g[i][j], b[i][j], r[i - 1][j], g[i - 1][j], b[i - 1][j]) || 
			  (ok(r[i][j], g[i][j], b[i][j], r[i][j - 1], g[i][j - 1], b[i][j - 1]))){
				t++;
			}
		}
	}
	long double x = (1.0 * t) / (1.0 * w * h) * 100;
	if(x < 5) return 4;
	if(x < 35) return 1;
	if(x < 65) return 2;
	return 3;
}

/*int main(){
    fast_io;



    return 0;
}*/
#Verdict Execution timeMemoryGrader output
Fetching results...