提出 #55603975
ソースコード 拡げる
// {{{
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using vi = vector<int>;
using pii = pair<int, int>;
#define sz(x) (int)((x).size())
#define all(x) (x).begin(), (x).end()
#define clr(a, b) memset(a, b, sizeof(a))
#define debug(x...)
#define debug_arr(x...)
#ifdef LOCAL
#include "prettyprint.hpp"
#endif
// }}}
int r, g, b;
string s;
int main()
{
#ifdef LOCAL
freopen("in", "r", stdin);
// freopen("out", "w", stdout);
#endif
cin.tie(0)->sync_with_stdio(0);
while (cin >> r >> g >> b)
{
cin >> s;
if (s == "Red") cout << min(g, b);
else if (s == "Green")
cout << min(r, b);
else
cout << min(r, g);
cout << endl;
}
return 0;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - Buy a Pen |
| ユーザ | mickeyandkaka |
| 言語 | C++ 20 (gcc 12.2) |
| 得点 | 100 |
| コード長 | 784 Byte |
| 結果 | AC |
| 実行時間 | 1 ms |
| メモリ | 3608 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 100 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 00_sample_00.txt | AC | 1 ms | 3480 KiB |
| 00_sample_01.txt | AC | 1 ms | 3364 KiB |
| 00_sample_02.txt | AC | 1 ms | 3364 KiB |
| 01_random_00.txt | AC | 1 ms | 3492 KiB |
| 01_random_01.txt | AC | 1 ms | 3488 KiB |
| 01_random_02.txt | AC | 1 ms | 3492 KiB |
| 01_random_03.txt | AC | 1 ms | 3484 KiB |
| 01_random_04.txt | AC | 1 ms | 3580 KiB |
| 01_random_05.txt | AC | 1 ms | 3492 KiB |
| 01_random_06.txt | AC | 1 ms | 3476 KiB |
| 01_random_07.txt | AC | 1 ms | 3608 KiB |
| 01_random_08.txt | AC | 1 ms | 3400 KiB |
| 01_random_09.txt | AC | 1 ms | 3468 KiB |
| 01_random_10.txt | AC | 1 ms | 3488 KiB |
| 01_random_11.txt | AC | 1 ms | 3496 KiB |
| 01_random_12.txt | AC | 1 ms | 3420 KiB |