結果
問題 | No.516 赤と青の風船 |
ユーザー |
![]() |
提出日時 | 2017-05-29 19:21:56 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 307 bytes |
コンパイル時間 | 522 ms |
コンパイル使用メモリ | 64,880 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-21 18:10:23 |
合計ジャッジ時間 | 1,037 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 4 WA * 2 |
ソースコード
#include<iostream> #include<string> using namespace std; int main() { string S; int c=0, c1=0,i=2; while (cin>>S&&i--) { if (S[0] == 'R'&&S[1] == 'E'&&S[2] == 'D') c++; if (S[0] == 'B'&&S[1] == 'L'&&S[2] == 'U'&&S[3] == 'E') c1++; } cout <<(( c > c1) ? "RED" : "BLUE" )<< endl; return 0; }