結果

問題 No.998 Four Integers
ユーザー chocorusk
提出日時 2020-02-28 21:21:05
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 739 bytes
コンパイル時間 944 ms
コンパイル使用メモリ 111,240 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-30 22:55:22
合計ジャッジ時間 1,652 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <utility>
#include <functional>
#include <time.h>
#include <stack>
#include <array>
#define popcount __builtin_popcount
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;

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