結果

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

ソースコード

diff #

#include "bits/stdc++.h"

using namespace std;
typedef long long int ll;
typedef pair<ll, ll > pi;  
typedef pair<pair<ll, ll >, ll > pii;  
vector<ll > vec;
vector<vector<ll > > vec2;
ll MOD = 1000000007;
ll INF = 1145141919454519;

int main(){

    ll A, B, C, D;
    cin >> A >> B >> C >> D;

    vector<ll > tmp;
    tmp.push_back(A);
    tmp.push_back(B);
    tmp.push_back(C);
    tmp.push_back(D);

    sort(tmp.begin(), tmp.end());

    for(ll i = 1; i < 4; i++){
        if(tmp[i-1] + 1 != tmp[i]){
            cout << "No" << endl;
            return 0;
        }
    }

    cout << "Yes" << endl;

}
0