結果
問題 | No.998 Four Integers |
ユーザー |
|
提出日時 | 2020-02-29 14:30:17 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 467 bytes |
コンパイル時間 | 1,621 ms |
コンパイル使用メモリ | 170,756 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-30 23:15:18 |
合計ジャッジ時間 | 2,422 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int a,b,c,d; cin>>a>>b>>c>>d; vector<int> numeros {a,b,c,d}; sort(numeros.begin(),numeros.end()); bool no_es = true; for (int i = 0; i < numeros.size()-1; i++) { if(numeros[i+1]!=(numeros[i]+1)){ no_es=false; cout<<"No"; return 0; } } cout<<"Yes"; return 0; }