結果

問題 No.998 Four Integers
ユーザー hiragn
提出日時 2020-08-23 00:51:24
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 5 ms / 1,000 ms
コード長 367 bytes
コンパイル時間 3,496 ms
コンパイル使用メモリ 200,128 KB
最終ジャッジ日時 2025-01-13 12:06:12
ジャッジサーバーID
(参考情報)
judge5 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
    vector<int> vt(4);
    set<int> st;
    for (int i = 0; i < 4; ++i) {
        cin >> vt[i];
        st.insert(vt[i]);
    }

    sort(vt.begin(), vt.end());
    if (vt[3] - vt[0] == 3 and st.size() == 4) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
    return 0;
}
0