結果

問題 No.998 Four Integers
ユーザー ch03715jch03715j
提出日時 2020-03-16 15:01:03
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 388 bytes
コンパイル時間 1,670 ms
コンパイル使用メモリ 170,412 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-30 23:22:54
合計ジャッジ時間 2,534 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
    
    int v[4];
    cin >>v[0]>>v[1]>>v[2]>>v[3];
    vector<int> vc(begin(v), end(v));
    sort(vc.begin(), vc.end());
    for(int i=0; i<vc.size()-1; i++){
        if(vc[i]+1 != vc[i+1]){
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
    return 0;
}
0