結果
問題 | No.998 Four Integers |
ユーザー |
|
提出日時 | 2020-02-28 22:26:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 535 bytes |
コンパイル時間 | 1,630 ms |
コンパイル使用メモリ | 171,276 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-30 23:10:25 |
合計ジャッジ時間 | 2,359 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
//om namah shivaaay// #include <bits/stdc++.h> #define Om_namah_Shivaay ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL) #define ll long long using namespace std; int main() { Om_namah_Shivaay; int a,b,c,d; cin>>a>>b>>c>>d; vector<int> arr; arr.push_back(a); arr.push_back(b); arr.push_back(c); arr.push_back(d); sort(arr.begin(),arr.end()); if(arr[1]==arr[0]+1 &&arr[2]==arr[1]+1&&arr[3]==arr[2]+1) { cout<<"Yes"<<endl; } else{ cout<<"No"<<endl; } }