結果
問題 |
No.930 数列圧縮
|
ユーザー |
![]() |
提出日時 | 2019-11-24 18:48:04 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 281 bytes |
コンパイル時間 | 1,439 ms |
コンパイル使用メモリ | 158,740 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-12 04:21:21 |
合計ジャッジ時間 | 5,829 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 3 WA * 21 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:9:3: warning: ‘b’ may be used uninitialized in this function [-Wmaybe-uninitialized] 9 | if( a < b){ cout << "Yes" << endl;} else{ cout << "No" << endl;} | ^~ main.cpp:9:3: warning: ‘a’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int a,b; for(int i = 0; i < n; i++){ int c; cin >> c; if( i == 0){ a = c;} else if( i == n-1){ b = c;} } if( a < b){ cout << "Yes" << endl;} else{ cout << "No" << endl;} return 0; }