結果
| 問題 |
No.396 クラス替え
|
| コンテスト | |
| ユーザー |
not_522
|
| 提出日時 | 2016-12-17 00:47:45 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 400 bytes |
| コンパイル時間 | 1,645 ms |
| コンパイル使用メモリ | 166,412 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-30 22:11:16 |
| 合計ジャッジ時間 | 2,418 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
struct Initializer {
Initializer() {
cin.tie(0);
ios::sync_with_stdio(0);
cout << fixed << setprecision(15);
}
} initializer;
int main() {
int n, m, x, y;
cin >> n >> m >> x >> y;
--x; --y;
x %= 2 * m;
y %= 2 * m;
if (x >= m) x = 2 * m - x - 1;
if (y >= m) y = 2 * m - y - 1;
cout << (x == y ? "YES" : "NO") << endl;
}
not_522