結果
問題 | No.998 Four Integers |
ユーザー | bonKotsu |
提出日時 | 2021-06-21 21:13:43 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 380 bytes |
コンパイル時間 | 1,677 ms |
コンパイル使用メモリ | 170,756 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-22 22:52:45 |
合計ジャッジ時間 | 2,367 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) #define P pair<int, int> int main() { vector<int> v(4); rep(i,4) cin >> v[i]; sort(v.begin(), v.end()); string ans = "Yes"; if (v[0] != v[1]-1) ans = "No"; if (v[1] != v[2]-1) ans = "No"; if (v[2] != v[3]-1) ans = "No"; cout << ans << endl; }