結果
| 問題 |
No.998 Four Integers
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-16 14:38:12 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 348 bytes |
| コンパイル時間 | 1,683 ms |
| コンパイル使用メモリ | 172,128 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-28 02:51:52 |
| 合計ジャッジ時間 | 2,584 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 8 WA * 15 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:10:17: warning: 'i' may be used uninitialized [-Wmaybe-uninitialized]
10 | for(int i; i<vc.size() -1 ; i++){
| ~^~~~~~~~~~~~~
main.cpp:10:13: note: 'i' was declared here
10 | for(int i; i<vc.size() -1 ; i++){
| ^
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ll v[4];
cin >> v[0],v[1],v[2],v[3];
vector<ll> vc (begin(v), end(v));
sort(vc.begin(), vc.end());
for(int i; i<vc.size() -1 ; i++){
if(vc[i]+1 != vc[i+1]){
cout << "No" << endl;
}
}
cout << "Yes" << endl;
}