結果

問題 No.998 Four Integers
ユーザー omgitskuu
提出日時 2020-03-16 22:58:20
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 423 bytes
コンパイル時間 689 ms
コンパイル使用メモリ 70,020 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-28 05:03:53
合計ジャッジ時間 1,458 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

#include <algorithm>
using namespace std;

int main() {
   
   string answer;
 int l, i=0, a[100];
    while(cin>>l){
        a[i] = l;
       
        i++;
    }
  sort(a, a+l);
     answer = "Yes";
     
        for (int i = 0; i < 3; ++i) 
    {      

            if (a[i]+1 != a[i+1]){ answer = "No"; break;}
    }        
     cout <<answer<< endl;
     return 0;
        }


    
   

   

    
0