結果

問題 No.998 Four Integers
ユーザー chacoder1chacoder1
提出日時 2021-03-18 23:12:53
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 8 ms / 1,000 ms
コード長 360 bytes
コンパイル時間 2,510 ms
コンパイル使用メモリ 193,584 KB
最終ジャッジ日時 2025-01-19 18:09:11
ジャッジサーバーID
(参考情報)
judge3 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
typedef pair<int,int>P;

int main(){
  int a[4];
  rep(i,4) cin>>a[i];
  sort(a,a+4);
  if(a[0]+1==a[1] && a[1]+1==a[2] && a[2]+1==a[3]){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  //cout<<a[0]<<a[1]<<a[2]<<a[3]<<endl;
  return 0;
}

0