結果
問題 | No.396 クラス替え |
ユーザー |
|
提出日時 | 2016-07-15 22:32:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 285 bytes |
コンパイル時間 | 683 ms |
コンパイル使用メモリ | 65,652 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 10:43:42 |
合計ジャッジ時間 | 1,282 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include <iostream> #include <cstdio> #include <algorithm> using namespace std; int main() { int n, m, x, y; cin >> n >> m >> x >> y; x--; y--; x %= 2 * m; y %= 2 * m; if (x > y) { swap(x, y); } cout << (x == y || x + y == 2*m - 1 ? "YES" : "NO") << endl; return 0; }