結果
問題 |
No.998 Four Integers
|
ユーザー |
![]() |
提出日時 | 2020-02-28 21:21:42 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 777 bytes |
コンパイル時間 | 1,176 ms |
コンパイル使用メモリ | 118,884 KB |
最終ジャッジ日時 | 2025-01-09 02:30:20 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include<iostream> #include<string> #include<vector> #include<algorithm> #include<bitset> #include<set> #include<map> #include<stack> #include<queue> #include<deque> #include<list> #include<iomanip> #include<cmath> #include<cstring> #include<functional> using namespace std; #define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define rep(i, n) repr(i, 0, n) #define INF 2e9 #define MOD 1000000007 //#define MOD 998244353 #define LINF (long long)4e18 #define jck 3.141592 using ll = long long; using Pi = pair<int,int>; using Pl = pair<ll,ll>; int main(){ vector<int> a(4); rep(i,4) cin >> a[i]; sort(a.begin(),a.end()); bool ok = true; rep(i,3){ if(a[i] != a[i+1]-1) ok = false; } cout << (ok?"Yes":"No") << endl; }