結果

問題 No.998 Four Integers
コンテスト
ユーザー beet
提出日時 2020-02-28 21:31:32
言語 C++17
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -fplugin=/usr/lib/yukicoder/noavx512-gcc15.so -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 1,000 ms
+ 824µs
コード長 511 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,505 ms
コンパイル使用メモリ 218,104 KB
実行使用メモリ 9,920 KB
最終ジャッジ日時 2026-10-25 09:54:13
合計ジャッジ時間 3,253 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge7_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<bits/stdc++.h>
using namespace std;
using Int = long long;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}


template<typename T> void drop(const T &x){cout<<x<<endl;exit(0);}

//INSERT ABOVE HERE
signed main(){
  Int a,b,c,d;
  cin>>a>>b>>c>>d;
  vector<Int> vs({a,b,c,d});
  sort(vs.begin(),vs.end());

  for(Int i=0;i<3;i++)
    if(vs[i+1]!=vs[i]+1) drop("No");
  drop("Yes");
  return 0;
}
0