結果
問題 | No.998 Four Integers |
ユーザー |
|
提出日時 | 2020-03-02 09:06:01 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 2,028 bytes |
コンパイル時間 | 2,153 ms |
コンパイル使用メモリ | 199,724 KB |
最終ジャッジ日時 | 2025-01-09 03:47:39 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include "bits/stdc++.h" using namespace std; #define Would #define you #define all(n) n.begin(),n.end() #define rall(n) n.rbegin(),n.rend() typedef long long ll; const ll INF = 2147483647; const ll MOD = 1e9 + 7; const double EPS = 1e-10; const double pi = acos(-1);//3.1415... const ll SIZE = 2000005; int dx[] = { 1,0,-1,0 }, dy[] = { 0,1,0,-1 }, alp[30]; ll fac[SIZE], finv[SIZE], inv[SIZE]; vector<ll>dij; struct edge { ll to, cost; }; vector<vector<edge>>G; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template<typename T> auto mod_pow(T a, T b) { ll res = 1, mul = a; for (int i = 0; i < 31; ++i) { if (b >> i & 1) { res *= mul; res %= MOD; } mul = (mul * mul) % MOD; } return res; } void addedge(int from, int to, int cost) { G[from].push_back({ to,cost }); G[to].push_back({ from,cost }); } template<typename T> vector<T> make_v(size_t a) { return vector<T>(a); } template<typename T, typename... Ts> auto make_v(size_t a, Ts... ts) { return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...)); } template<typename T, typename V> typename enable_if<is_class<T>::value == 0>::type fill_v(T & t, const V & v) { t = v; } template<typename T, typename V> typename enable_if<is_class<T>::value != 0>::type fill_v(T & t, const V & v) { for (auto& e : t) fill_v(e, v); } template<typename T> void outp(vector<T>v) { for (int i = 0; i < v.size(); ++i) { cout << v[i]; if (i != v.size() - 1) { cout << " "; } } } double add(double a, double b) { if (abs(a + b) < EPS * (abs(a) + abs(b))) { return 0; } return a + b; } double len(int a, int b, int c, int d) { return (double)sqrt((a - c) * (a - c) + (b - d) * (b - d)); } int main() { int k[5]; for (int i = 0; i < 4; ++i) { cin >> k[i]; } sort(k, k + 4); for (int i = 1; i < 4; ++i) { if (k[i] - 1 != k[i - 1]) { cout << "No" << endl; return 0; } } cout << "Yes" << endl; }