結果
問題 |
No.396 クラス替え
|
ユーザー |
![]() |
提出日時 | 2016-07-15 22:31:24 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 509 bytes |
コンパイル時間 | 457 ms |
コンパイル使用メモリ | 66,396 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-15 04:16:55 |
合計ジャッジ時間 | 1,292 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 4 |
ソースコード
#include <iostream> #include <vector> #include <cstring> #include <string> #include <algorithm> #include <iomanip> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int N, M, X, Y; cin >> N >> M >> X >> Y; X--, Y--; int r1 = X / M, r2 = Y / M; if(r1 % 2 == r2 % 2) { if(X % M == Y % M) { cout << "YES" << endl; } else { cout << "NO" << endl; } } else { if(X % M == (M - 1 + Y) % M) { cout << "YES" << endl; } else { cout << "NO" << endl; } } }