結果
| 問題 |
No.516 赤と青の風船
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-30 08:51:19 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 579 bytes |
| コンパイル時間 | 2,150 ms |
| コンパイル使用メモリ | 180,796 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-19 06:35:29 |
| 合計ジャッジ時間 | 2,862 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 6 |
ソースコード
/**
@file 516.cpp
@title No.516 赤と青の風船 - yukicoder
@url https://yukicoder.me/problems/no/516
**/
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#define ALL(obj) (obj).begin(), (obj).end()
#define REP(i, N) for (int i = 0; i < (N); ++i)
int main() {
string S;
vector<pair<int, string>> R_B;
R_B.push_back(make_pair(0, "RED"));
R_B.push_back(make_pair(0, "BLUE"));
while (cin >> S) {
if (S == "RED") R_B[0].first--;
if (S == "BLUE") R_B[1].first--;
}
sort(ALL(R_B));
cout << R_B[0].second << endl;
return 0;
}