結果
問題 | No.516 赤と青の風船 |
ユーザー |
![]() |
提出日時 | 2017-08-16 00:52:45 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 294 bytes |
コンパイル時間 | 492 ms |
コンパイル使用メモリ | 56,728 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-13 11:09:53 |
合計ジャッジ時間 | 931 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | AC * 3 WA * 3 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:12:9: warning: ‘bluc’ may be used uninitialized in this function [-Wmaybe-uninitialized] 12 | if (redc > bluc) { | ^~ main.cpp:12:9: warning: ‘redc’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ソースコード
#include <iostream>#include <string>int main() {std::string str;int redc, bluc;while (std::cin >> str) {if (str == "RED") redc++;if (str == "BLUE") bluc++;}if (redc > bluc) {std::cout << "RED" << std::endl;}else {std::cout << "BLUE" << std::endl;}return 0;}