結果

問題 No.396 クラス替え
ユーザー NagisaNagisa
提出日時 2016-07-17 09:48:55
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 404 bytes
コンパイル時間 1,711 ms
コンパイル使用メモリ 164,356 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-23 14:53:42
合計ジャッジ時間 4,137 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,816 KB
testcase_01 AC 2 ms
6,816 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 73 ms
6,944 KB
testcase_04 AC 51 ms
6,940 KB
testcase_05 AC 101 ms
6,940 KB
testcase_06 WA -
testcase_07 AC 8 ms
6,940 KB
testcase_08 AC 373 ms
6,940 KB
testcase_09 AC 63 ms
6,944 KB
testcase_10 WA -
testcase_11 AC 306 ms
6,944 KB
testcase_12 AC 75 ms
6,940 KB
testcase_13 WA -
testcase_14 AC 302 ms
6,944 KB
testcase_15 AC 304 ms
6,940 KB
testcase_16 WA -
testcase_17 AC 2 ms
6,940 KB
testcase_18 AC 2 ms
6,944 KB
testcase_19 AC 1 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define REP(i,n) for(int i = 0; i < (int)(n); ++i)
using namespace std;

int main(){
    int N, M, X, Y;
    cin >> N >> M;
    cin >> X >> Y;
    int x = min(X,Y);
    int y = max(X,Y);
    bool flag = false;
    int m = M;
    while(2*m<=N){
        if(y==2*m+x or y==2*m-x+1){flag = true; break;}
        else m++;
    }
    cout << (flag?"YES":"NO") << endl;
    return 0;
}
0