結果
| 問題 |
No.998 Four Integers
|
| コンテスト | |
| ユーザー |
ashipan
|
| 提出日時 | 2020-04-27 14:42:20 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 405 bytes |
| コンパイル時間 | 786 ms |
| コンパイル使用メモリ | 73,856 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-21 17:10:36 |
| 合計ジャッジ時間 | 1,879 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#define rep(i, a, n) for(int i = a; i < n; i++)
using namespace std;
int main()
{
vector<int> a(4);
rep(i, 0, 4){
cin >> a[i];
}
sort(a.begin(), a.end());
rep(i, 1, 4){
if(a[i] - a[i-1] != 1){
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
return 0;
}
ashipan