# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
844079 | GrandTiger1729 | Chessboard (IZhO18_chessboard) | C++17 | 169 ms | 2136 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
struct Data
{
int x1, y1, x2, y2;
Data() = default;
Data(int _x1, int _y1, int _x2, int _y2) : x1(_x1), y1(_y1), x2(_x2), y2(_y2) {}
};
const long long INF = 1e18;
int main()
{
cin.tie(0)->sync_with_stdio(0);
// freopen("in.in", "r", stdin);
// freopen("out.out", "w", stdout);
int M, n; cin >> M >> n;
vector<Data> a(n);
for (int i = 0; i < n; i++)
{
int x1, y1, x2, y2;
cin >> x1 >> y1 >> x2 >> y2;
x1--, y1--;
a[i] = Data(x1, y1, x2, y2);
}
auto color = [&](int t, int K, int x, int y) -> int // 1 for black -1 for white
{
return (t + x / K + y / K) % 2 == 1 ? 1 : -1;
};
auto solve = [&](int K) -> long long
# | 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... |