結果
| 問題 |
No.998 Four Integers
|
| コンテスト | |
| ユーザー |
f843nmfwisfeuw
|
| 提出日時 | 2020-08-14 18:50:33 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 644 bytes |
| コンパイル時間 | 1,096 ms |
| コンパイル使用メモリ | 97,408 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-10 12:13:41 |
| 合計ジャッジ時間 | 1,977 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
#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