結果

問題 No.998 Four Integers
ユーザー UGLO
提出日時 2020-08-23 19:21:15
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 356 bytes
コンパイル時間 1,429 ms
コンパイル使用メモリ 170,328 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-15 19:17:14
合計ジャッジ時間 2,429 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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)
using ll = long long;

int main(){
    vector<int> a(4);
    rep(i,4) cin >> a[i];
    sort(a.begin(),a.end());
    for(int i=1; i<4; i++){
        if(a[i]!=a[i-1]+1){
            cout << "No" << endl;
            return 0;
        }
    }

    cout << "Yes" << endl;
}
0