結果
問題 | No.998 Four Integers |
ユーザー | a163236 |
提出日時 | 2020-02-28 21:24:06 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 473 bytes |
コンパイル時間 | 1,782 ms |
コンパイル使用メモリ | 170,056 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-30 23:01:31 |
合計ジャッジ時間 | 2,158 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#define _LIBCPP_DEBUG 0 #include<bits/stdc++.h> using namespace std; typedef long long int ll; ll MOD = 1e9 + 7; int main(void){ vector<int> A(4); for (int i = 0; i < 4; ++i) { cin>>A[i]; } sort(A.begin(), A.end()); bool ok = true; for (int i = 1; i < 4; ++i) { if(A[i]!=A[i-1]+1) { ok = false; break; } } if(ok){ cout<<"Yes"<<endl; }else{ cout<<"No"<<endl; } }