結果
| 問題 |
No.998 Four Integers
|
| コンテスト | |
| ユーザー |
LuckyHappy0108
|
| 提出日時 | 2020-04-15 10:06:24 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 474 bytes |
| コンパイル時間 | 1,658 ms |
| コンパイル使用メモリ | 170,692 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-01 18:41:07 |
| 合計ジャッジ時間 | 2,301 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using ll = long long;
#define rep(i, j, n) for(int i = j; i < (int)(n); i++)
const ll MOD = 1000000007;
const ll INF = 1LL << 60;
int main() {
vector<int> n(4);
cin >> n.at(0) >> n.at(1) >> n.at(2) >> n.at(3);
sort(n.begin(), n.end());
bool ok = true;
rep(i, 0, 3) {
if (n.at(i) != n.at(i + 1) - 1) ok = false;
}
if (ok) cout << "Yes" << endl;
else cout << "No" << endl;
}
LuckyHappy0108