# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
706573 | LittleCube | Chessboard (IZhO18_chessboard) | C++14 | 677 ms | 5808 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define ll long long
#define pll pair<ll, ll>
#define F first
#define S second
using namespace std;
ll N, K, l[100005], d[100005], r[100005], u[100005];
ll ans;
pll operator+(pll p1, pll p2)
{
return pll(p1.F + p2.F, p1.S + p2.S);
}
bool isB(int x, int y, int M)
{
return (x / M + y / M) % 2;
}
pll calcCorner(ll L, ll R, ll D, ll U, int M)
{
if (isB(L, D, M))
return pll((R - L) * (U - D), 0);
else
return pll(0, (R - L) * (U - D));
}
pll calcColumn(ll L, ll R, ll D, ll U, int M)
{
# | 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... |