結果
問題 | No.998 Four Integers |
ユーザー |
![]() |
提出日時 | 2020-04-09 12:48:04 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 541 bytes |
コンパイル時間 | 1,739 ms |
コンパイル使用メモリ | 170,952 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-13 04:02:44 |
合計ジャッジ時間 | 2,819 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
/** * author: TakeruOkuyama * created: 2020-04-09 12:39:57 **/ #include <bits/stdc++.h> #define rep(i, n) for(int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair<int, int>; int main(){ vector<int> I(4); rep(i, 4){ cin >> I[i]; } sort(I.begin(), I.end()); /*rep(i, 4){ cout << I[i] << endl; }*/ rep(i, 3){ if(I[i + 1] - I[i] != 1){ cout << "No" << endl; return 0; } } cout << "Yes" << endl; return 0;} /** **/