結果
| 問題 | No.998 Four Integers |
| コンテスト | |
| ユーザー |
omgitskuu
|
| 提出日時 | 2020-03-16 22:40:39 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 478 bytes |
| 記録 | |
| コンパイル時間 | 503 ms |
| コンパイル使用メモリ | 80,256 KB |
| 実行使用メモリ | 13,056 KB |
| 最終ジャッジ日時 | 2026-05-22 07:21:28 |
| 合計ジャッジ時間 | 5,244 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 1 RE * 14 TLE * 1 -- * 7 |
ソースコード
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int N;
int A[210];
bool answer;
int l, i=0, a[10];
while(cin>>l){
a[i] = l;
i++;
}
sort(a, a+l);
answer = true;
for (int i = 0; i < 4; ++i) {
if (a[i]+=1 == a[i+1]){answer = true;}else{ answer = false; break;}
}
if(answer==true) {cout << "yes" << endl; }else{cout <<"no" << endl; }
}
omgitskuu