結果
問題 |
No.998 Four Integers
|
ユーザー |
|
提出日時 | 2020-06-20 15:38:09 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 29 ms / 1,000 ms |
コード長 | 242 bytes |
コンパイル時間 | 2,099 ms |
コンパイル使用メモリ | 198,056 KB |
最終ジャッジ日時 | 2025-01-11 08:42:43 |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ vector<int>v(4); for(auto&&i:v)cin>>i; sort(v.begin(),v.end()); for(auto i=v.begin()+1;i!=v.end();++i){ if(*i-*(i-1)!=1){ cout<<"No\n"s; return 0; } } cout<<"Yes\n"s; }