結果
問題 | No.998 Four Integers |
ユーザー |
|
提出日時 | 2021-02-17 19:03:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 461 bytes |
コンパイル時間 | 1,608 ms |
コンパイル使用メモリ | 168,988 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-14 04:57:57 |
合計ジャッジ時間 | 2,668 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) template<class T> inline bool chmax(T&a,T b){if(a<b){a=b;return 1;}return 0;} template<class T> inline bool chmin(T&a,T b){if(a>b){a=b;return 1;}return 0;} using ll = long long; int a[4]; int main () { cin.tie(0); ios::sync_with_stdio(false); rep(i,4) cin >> a[i]; sort(a,a+4); cout << (a[0]+1==a[1] && a[1]+1==a[2] && a[2]+1==a[3] ? "Yes" : "No") << endl; }