# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
897823 | DAleksa | Chessboard (IZhO18_chessboard) | C++17 | 637 ms | 4512 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int K = 1e5 + 10, SQ = 700;
int n, k;
int x1[K], Y1[K], x2[K], y2[K];
vector<int> divs;
long long sum[SQ], P;
long long get(int x, int y, int k) {
if(x == 0 || y == 0) {
return 0;
}
int X = (x / k) * k, Y = (y / k) * k;
long long ans = ((X / k) * 1LL * (Y / k) + 1) / 2 * k * k;
// cout << k << "\n";
// cout << x << " " << y << "\n";
// cout << X << " " << Y << "\n";
// cout << ans << "\n";
ans += (x - X) * 1LL * k * (((Y / k) + ((X / k) % 2 == 0)) / 2);
// cout << ans << "\n";
ans += (y - Y) * 1LL * k * (((X / k) + ((Y / k) % 2 == 0)) / 2);
// cout << ans << "\n";
if((X / k + Y / k) % 2 == 0) {
ans += (x - X) * 1LL * (y - Y);
}
return ans;
}
컴파일 시 표준 에러 (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... |