結果
| 問題 |
No.998 Four Integers
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-02-28 21:39:09 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 2,275 bytes |
| コンパイル時間 | 1,370 ms |
| コンパイル使用メモリ | 169,120 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-30 23:05:38 |
| 合計ジャッジ時間 | 2,119 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
#pragma region template
#include <bits/stdc++.h>
using namespace std;
// -type-
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vs = vector<string>;
using vpii = vector<pii>;
using vpll = vector<pll>;
// -const-
const ll MOD = 1000000007;
const ll INF = (ll)0x3f0000003f000000;
const double EPS = 1e-9;
const int dx[] = {0, 1, 0, -1, 1, -1, 1, -1},
dy[] = {1, 0, -1, 0, 1, -1, -1, 1};
// -define-
#define reps(i, k, n) for (int i = (k), i##_len = (n); i < i##_len; ++i)
#define rep(i, n) reps(i, 0, n)
#define repsr(i, k, n) \
for (int i = int(n) - 1, i##_len = (k); i >= i##_len; --i)
#define repr(i, n) for (int i = int(n) - 1; i >= 0; --i)
#define all(o) begin(o), end(o)
#define sz(a) ((int)(a).size())
#define debug(...) debug_args(__LINE__, __VA_ARGS__)
// clang-format off
// -functions-
inline bool in(string s, string c) {return (s.find(c) != string::npos);}
inline bool in(string s, char c) {return (s.find(c) != string::npos);}
template <class T> T udiv(T a, T b) {return (a + b - 1) / b;}
template <class T> T rdiv(T a, T b) {return (a + b / 2) / b;}
void print_args(ostream&) {}
template <class S, class... T>
void print_args(ostream& out,const S& a,const T&... args) {
out << ' ' << a;
print_args(out, args...);
}
template <class S, class... T>
void print(const S& a, const T&... args) {
std::cout << a;
print_args(std::cout, args...);
std::cout << '\n';
}
template <class S, class... T>
void debug_args(const S& a, const T&... args) {
std::cout << "(L:" << std::setw(3) << a << ")";
print_args(std::cout, args...);
std::cout << '\n';
}
// clang-format on
struct setup_main {
setup_main() {
std::cin.tie(0);
std::ios::sync_with_stdio(0);
std::cout << fixed << setprecision(15);
}
} setup_main_;
ll ans = 0;
#pragma endregion
using typ = array<int, 4>;
bool is_seq(typ a) {
if (a[1] - a[0] == 1 and a[2] - a[1] == 1 and a[3] - a[2] == 1) return true;
return false;
}
int main() {
typ in;
cin >> in[0] >> in[1] >> in[2] >> in[3];
sort(all(in));
if (is_seq(in))
print("Yes");
else
print("No");
}