結果
問題 | No.516 赤と青の風船 |
ユーザー |
![]() |
提出日時 | 2018-09-28 21:15:15 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 247 bytes |
コンパイル時間 | 1,501 ms |
コンパイル使用メモリ | 167,188 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-12 05:35:20 |
合計ジャッジ時間 | 1,921 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 2 WA * 4 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:8:27: warning: 'cnt' may be used uninitialized [-Wmaybe-uninitialized] 8 | if(s == "RED") cnt++; | ~~~^~ main.cpp:4:9: note: 'cnt' was declared here 4 | int cnt; | ^~~
ソースコード
#include <bits/stdc++.h>using namespace std;int main(){int cnt;for(int i=0; i < 3; i++){string s;cin >> s;if(s == "RED") cnt++;}if(cnt >= 2) cout << "RED" << endl;else cout << "BLUE" << endl;}