# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
776357 | tolbi | Art Class (IOI13_artclass) | C++17 | 83 ms | 6220 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#pragma optimize("Bismillahirrahmanirrahim")
//█▀█─█──█──█▀█─█─█
//█▄█─█──█──█▄█─█■█
//█─█─█▄─█▄─█─█─█─█
//Allahuekber
//ahmet23 orz...
//FatihSultanMehmedHan
//YavuzSultanSelimHan
//AbdulhamidHan
//Sani buyuk Osman Pasa Plevneden cikmam diyor.
#define author tolbi
#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
#define sortarr(x) sort(x.begin(), x.end())
#define sortrarr(x) sort(x.rbegin(), x.rend())
#define coutarr(x) for (auto &it : x) cout<<it<<" ";cout<<endl;
#define rev(x) reverse(x.begin(), x.end())
#define tol(bi) (1LL<<((int)(bi)))
mt19937 ayahya(chrono::high_resolution_clock().now().time_since_epoch().count());
typedef long long ll;
const ll MOD = 1e9+7;
const ll INF = 1e18;
#include "artclass.h"
int r[500][500];
int g[500][500];
int b[500][500];
int delta_g(pair<int,int> ac, pair<int,int> bc){
return
abs(r[ac.first][ac.second]-r[bc.first][bc.second])+
abs(g[ac.first][ac.second]-g[bc.first][bc.second])+
abs(b[ac.first][ac.second]-b[bc.first][bc.second]);
}
int style(int n, int m, int R[500][500], int G[500][500], int B[500][500]) {
for (int i = 0; i < 500; i++){
for (int j = 0; j < 500; j++){
r[i][j]=R[i][j];
g[i][j]=G[i][j];
b[i][j]=B[i][j];
}
}
int say = 0;
int treshold1=50;
int treshold2=10000;
double treshold3=0.8;
int treshold4=100;
int grsay = 0;
for (int i = 0; i < 500; i++){
for (int j = 0; j < 500; j++){
if (i && delta_g({i,j},{i-1,j})<treshold1) say++;
if (j && delta_g({i,j},{i-1,j})<treshold1) say++;
if (g[i][j]*treshold3>b[i][j] && b[i][j]>r[i][j]) grsay++;
}
}
if (say>treshold2){
if (grsay>treshold4) return 2;
return 3;
}
return (ayahya()%2)*3+1;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |