結果
| 問題 |
No.998 Four Integers
|
| コンテスト | |
| ユーザー |
ferin
|
| 提出日時 | 2020-02-28 21:21:33 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 836 bytes |
| コンパイル時間 | 2,011 ms |
| コンパイル使用メモリ | 196,348 KB |
| 最終ジャッジ日時 | 2025-01-09 02:29:49 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PII = pair<ll, ll>;
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
template<typename T> void chmin(T &a, const T &b) { a = min(a, b); }
template<typename T> void chmax(T &a, const T &b) { a = max(a, b); }
struct FastIO {FastIO() { cin.tie(0); ios::sync_with_stdio(0); }}fastiofastio;
#ifdef DEBUG_
#include "../program_contest_library/memo/dump.hpp"
#else
#define dump(...)
#endif
const ll INF = 1LL<<60;
int main(void) {
vector<ll> v(4);
REP(i, 4) cin >> v[i];
sort(ALL(v));
bool flag = true;
FOR(i, 1, 4) {
if(v[i] != v[i-1]+1) {
flag = false;
}
}
if(flag) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}
ferin