結果

問題 No.998 Four Integers
ユーザー P₋boy
提出日時 2024-05-11 08:45:59
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 275 bytes
コンパイル時間 2,037 ms
コンパイル使用メモリ 197,092 KB
最終ジャッジ日時 2025-02-21 13:31:53
ジャッジサーバーID
(参考情報)
judge3 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
    vector<int> N(4);
    for(auto &ni : N) cin >> ni;
    sort(N.begin(), N.end());
    if(N[0] + 1 == N[1]&&N[1] + 1 == N[2]&&N[2] + 1 == N[3]){
        cout << "Yes" << endl;
    }
    else cout << "No" << endl;
}
0