結果
| 問題 | 
                            No.998 Four Integers
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-04-12 00:15:43 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 389 bytes | 
| コンパイル時間 | 587 ms | 
| コンパイル使用メモリ | 69,716 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-09-19 18:00:24 | 
| 合計ジャッジ時間 | 1,420 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 WA * 1 | 
| other | AC * 8 WA * 15 | 
ソースコード
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
    int nums[4];
    for (int i = 0; i < 4; i++)
        cin >> nums[i];
    sort(nums, nums+4);
    bool ok = true;
    for (int i = 0; i < 3; i++) {
        if (nums[i + 1] - nums[i] != 1) {
            ok = true;
            break;
        }
    }
    cout << (ok ? "Yes" : "No") << endl;
    return 0;
}