# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
50842 | Nicksechko | Chessboard (IZhO18_chessboard) | C++14 | 715 ms | 2300 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>
using namespace std;
typedef long long ll;
typedef long double ld;
const int MX = 100 * 1000 + 7;
#define y1 ak_a_kak_podnyat
int x1[MX], y1[MX], x2[MX], y2[MX];
pair<int, int> slv(int l, int r, int s) {
if (l / s == r / s) {
int b = l / s;
if (b & 1) {
return {0, r - l + 1};
} else {
return {r - l + 1, 0};
}
} else {
pair<int, int> a(0, 0);
int nl = l - l % s + s, nr = r - r % s - 1;
if ((l / s) % 2 == 0) {
a.first += nl - l;
} else {
a.second += nl - l;
}
if ((r / s) % 2 == 0) {
Compilation message (stderr)
# | 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... |