# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
501866 | NachoLibre | Chessboard (IZhO18_chessboard) | C++17 | 839 ms | 4488 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 ld long double
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
using namespace std;
ll Fw(ll n, ll m, int w) {
return n / w * m / w / 2 * w * w;
}
ll Fb(ll n, ll m, int w) {
return n * m - Fw(n, m, w);
}
ll B(ll n, ll m, int w, int x = 0, int y = 0) {
if(x / w + y / w & 1)
return Fb(n, m, w);
return Fw(n, m, w);
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
#ifdef wambule
freopen("untitledfile.txt", "r", stdin);
#endif
ll n;
int k;
cin >> n >> k;
vector<array<int, 4>> v;
for(int i = 0; i < k; ++i) {
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... |