結果

問題 No.998 Four Integers
ユーザー ue_sho
提出日時 2020-02-28 21:38:45
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 551 bytes
コンパイル時間 1,637 ms
コンパイル使用メモリ 168,088 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-30 23:04:31
合計ジャッジ時間 2,482 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<(n); ++i)
#define REP(i, d, n) for(int i=(d); i<(n); ++i)
#define all(v) v.begin(), v.end()
using ll = long long;
using P = pair<int, int>;

int main() {

    int a[4];
    cin >> a[0] >> a[1] >> a[2] >> a[3];

    sort(a, a+4);

    bool ok = true;
    REP(i, 1, 4){
        if(a[i-1] != a[i] - 1){
            ok = false;
            break;
        }
    }
    if(ok){
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }



    return 0;
}
0