Submission #57462723
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pl = pair<ll, ll>;
constexpr ll INF = 1e9 + 7;
constexpr ll mod = 1e9 + 7;
constexpr ld eps = 1e-9;
const ld PI = acos(-1);
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
vector<int> a(3);
for(auto &i : a)cin >> i;
string s;cin >> s;
if(s[0]=='R')a.erase(a.begin());
else if(s[0] == 'G')a.erase(a.begin() + 1);
else a.erase(a.begin() + 2);
cout << *min_element(a.begin(),a.end());
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Buy a Pen |
| User | ZergTricky |
| Language | C++ 20 (gcc 12.2) |
| Score | 100 |
| Code Size | 544 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3628 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| 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 |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 1 ms | 3568 KiB |
| 00_sample_01.txt | AC | 1 ms | 3424 KiB |
| 00_sample_02.txt | AC | 1 ms | 3488 KiB |
| 01_random_00.txt | AC | 1 ms | 3496 KiB |
| 01_random_01.txt | AC | 1 ms | 3500 KiB |
| 01_random_02.txt | AC | 1 ms | 3472 KiB |
| 01_random_03.txt | AC | 1 ms | 3496 KiB |
| 01_random_04.txt | AC | 1 ms | 3568 KiB |
| 01_random_05.txt | AC | 1 ms | 3476 KiB |
| 01_random_06.txt | AC | 1 ms | 3568 KiB |
| 01_random_07.txt | AC | 1 ms | 3428 KiB |
| 01_random_08.txt | AC | 1 ms | 3492 KiB |
| 01_random_09.txt | AC | 1 ms | 3428 KiB |
| 01_random_10.txt | AC | 1 ms | 3500 KiB |
| 01_random_11.txt | AC | 1 ms | 3360 KiB |
| 01_random_12.txt | AC | 1 ms | 3628 KiB |