# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
378570 | 2qbingxuan | Chessboard (IZhO18_chessboard) | C++14 | 340 ms | 2028 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#ifdef local
#define safe std::cerr<<__PRETTY_FUNCTION__<<" line "<<__LINE__<<" safe\n"
#define debug(a...) qqbx(#a, a)
template <typename ...T> void qqbx(const char *s, T ...a) {
int cnt = sizeof...(T);
((std::cerr << "\033[1;32m(" << s << ") = (") , ... , (std::cerr << a << (--cnt ? ", " : ")\033[0m\n")));
}
#else
#define safe ((void)0)
#define debug(...) ((void)0)
#endif // local
using namespace std;
using ll = int64_t;
const int maxn = 100025;
const ll INF = 1e18;
bool isBlack(int x, int y) {
return (x + y) & 1;
}
ll calc2d(int x, int y, int k, bool c) {
if (x < 0 || y < 0) return 0;
++x, ++y;
ll qx = x / k, rx = x % k;
ll qy = y / k, ry = y % k;
ll ans = 0;
ans += ry * k * (isBlack(0, qy) == c ? (qx + 1) / 2 : qx / 2);
ans += rx * k * (isBlack(qx, 0) == c ? (qy + 1) / 2 : qy / 2);
ans += k * k * (isBlack(0, 0) == c ? (qx * qy + 1) / 2 : qx * qy / 2);
컴파일 시 표준 에러 (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... |