結果
| 問題 | No.998 Four Integers |
| コンテスト | |
| ユーザー |
f843nmfwisfeuw
|
| 提出日時 | 2020-08-14 18:50:33 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 2 ms / 1,000 ms |
| + 325µs | |
| コード長 | 644 bytes |
| 記録 | |
| コンパイル時間 | 693 ms |
| コンパイル使用メモリ | 117,996 KB |
| 実行使用メモリ | 9,900 KB |
| 最終ジャッジ日時 | 2026-11-12 01:30:53 |
| 合計ジャッジ時間 | 2,821 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 25 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <stack>
#include <algorithm>
#include <string>
#include <map>
#include <iterator>
#include <set>
#include <queue>
#include <bitset>
using namespace std;
int main() {
int A, B, C, D;
cin >> A >> B >> C >> D;
vector<int> a = {A, B, C, D};
sort(a.begin(), a.end());
int t = a[0];
bool ok = true;
for (int i = 1; i < 4; ++i) {
if (t + 1 != a[i]) {
ok = false;
break;
} else {
t = a[i];
}
}
cout << (ok ? "Yes" : "No") << endl;
return 0;
}
f843nmfwisfeuw