結果
問題 | No.396 クラス替え |
ユーザー |
![]() |
提出日時 | 2023-12-11 00:31:20 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 435 bytes |
コンパイル時間 | 891 ms |
コンパイル使用メモリ | 102,636 KB |
最終ジャッジ日時 | 2025-02-18 10:10:19 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include<iostream> #include<string> #include<algorithm> #include<cctype> #include<set> #include<bitset> #include<math.h> #include<map> #include<queue> #include<iomanip> using namespace std; using ll = long long; int main() { int n, m, x, y; cin >> n >> m >> x >> y; x--; y--; x %= m*2; y %= m*2; if (x >= m) x = 2*m -1 - x; if (y >= m) y = 2*m -1 - y; cout << ((x == y) ? "YES" : "NO") << endl; }