結果
問題 |
No.998 Four Integers
|
ユーザー |
|
提出日時 | 2020-04-01 07:48:27 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 1,000 ms |
コード長 | 440 bytes |
コンパイル時間 | 2,751 ms |
コンパイル使用メモリ | 194,124 KB |
最終ジャッジ日時 | 2025-01-09 11:23:54 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(int argc, const char *argv[]) { std::ios::sync_with_stdio(false); int nums[4]; for (int i = 0; i < 4; i++) { cin >> nums[i]; } sort(nums, nums+4); for (int i = 1; i < 4; i++) { if (nums[i] != nums[i-1] + 1) { std::cout << "No" << std::endl; return 0; } } std::cout << "Yes" << std::endl; return 0; }