結果
| 問題 |
No.998 Four Integers
|
| コンテスト | |
| ユーザー |
tinumukiti631
|
| 提出日時 | 2020-02-28 21:22:35 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 1,847 bytes |
| コンパイル時間 | 1,679 ms |
| コンパイル使用メモリ | 170,820 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-30 23:00:10 |
| 合計ジャッジ時間 | 2,560 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using vint = vector<int>;
using vvint = vector<vint>;
using vvvint = vector<vvint>;
using vdouble = vector<double>;
using vvdouble = vector<vdouble>;
using vvvdouble = vector<vvdouble>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using uint = unsigned int;
using ull = unsigned long long;
template<typename T> using uset = unordered_set<T>;
template<typename T1, typename T2> using umap = unordered_map<T1, T2>;
constexpr int INF = (1 << 30) - 1;
constexpr ll LLINF = 1LL << 60;
constexpr int dy[] = {1, 0, -1, 0, 1, -1, -1, 1};
constexpr int dx[] = {0, 1, 0, -1, 1, 1, -1, -1};
constexpr char el = '\n';
constexpr int mod = 1000000007;
template<typename T> T gcd(T a, T b) { return (b ? gcd(b, a % b) : a); }
template<typename T> T lcm(T a, T b) { return (a / gcd(a, b) * b); }
template<typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) { return (a > b && (a = b, true)); }
template<typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) { return (a < b && (a = b, true)); }
template<typename T>
ostream& operator <<(ostream &os, vector<T> &v) {
os << v[0];
for (int i = 1; i < v.size(); i++) os << " " << v[i];
return (os);
}
template<typename T>
istream& operator >>(istream &is, vector<T> &v) {
for (auto &u : v) is >> u; return (is);
}
template<typename T1, typename T2>
istream& operator >>(istream &is, pair<T1, T2> &p) {
return (is >> p.first >> p.second);
}
void Main() {
vint D(4); cin >> D;
sort(begin(D), end(D));
if (D[0] + 1 == D[1] && D[1] + 1 == D[2] && D[2] + 1 == D[3]) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
int main() {
cin.tie(0);
ios::sync_with_stdio(0);
cout << fixed << setprecision(20);
Main();
return (0);
}
tinumukiti631