結果

問題 No.998 Four Integers
ユーザー okkuukenken
提出日時 2022-06-03 15:49:47
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 196 bytes
コンパイル時間 873 ms
コンパイル使用メモリ 88,708 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-21 02:18:52
合計ジャッジ時間 1,927 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int a[4];
	cin>>a[0]>>a[1]>>a[2]>>a[3];
	sort(a,a+4);
	cout<<(a[0]+1==a[1]&&a[1]+1==a[2]&&a[2]+1==a[3]?"Yes":"No")<<endl;
}
0