# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
173862 | VEGAnn | Chessboard (IZhO18_chessboard) | C++14 | 1853 ms | 4368 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define sz(x) ((int)x.size())
#define pii pair<int, int>
#define ft first
#define sd second
#define MP make_pair
#define PB push_back
using namespace std;
typedef long long ll;
const int oo = 2e9;
const ll OO = 1e18;
const int N = 100100;
ll ans = OO, gl;
int x1[N], Y1[N], x2[N], y2[N], n, k;
ll calc(ll x, ll y){
if (x <= 0 || y <= 0) return 0;
ll kl = y / gl, res = 0;
ll ko = x / gl;
ll ad1 = 0, ad2 = 0;
if (x % gl > 0){
if (ko % 2 == 0)
ad1 += x % gl;
else ad2 += x % gl;
}
res += ((kl + 1) / 2ll) * gl * ((ko + 1) / 2ll * gl + ad1);
res += ((kl + 0) / 2ll) * gl * ((ko + 0) / 2ll * gl + ad2);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |