結果
| 問題 |
No.998 Four Integers
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-16 23:39:04 |
| 言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 339 bytes |
| コンパイル時間 | 909 ms |
| コンパイル使用メモリ | 129,364 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-30 16:55:22 |
| 合計ジャッジ時間 | 1,690 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
string ans = "Yes";
int a, b, c, d;
cin >> a >> b >> c >> d;
int xs[] = {a, b, c, d};
sort(xs, end(xs));
for (int i = 0; i < 3; i ++) {
if (xs[i] + 1 != xs[i + 1]) {
ans = "No";
break;
}
}
cout << ans << endl;
return 0;
}