結果

問題 No.396 クラス替え
ユーザー greentea011
提出日時 2019-03-20 15:14:37
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 244 bytes
コンパイル時間 523 ms
コンパイル使用メモリ 63,184 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-19 00:41:25
合計ジャッジ時間 1,365 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

int main() {
    int n,m,x,y;
    std::cin >> n >> m >> x >> y;

    int a=(x-1)%m*((x-1)/m==0?1:-1)+((x-1)/m==0?1:m);
    int b=(y-1)%m*((y-1)/m==0?1:-1)+((y-1)/m==0?1:m);
    std::cout << (a==b?"YES":"NO") << std::endl;
}
0