結果
| 問題 |
No.2920 Blood Type
|
| コンテスト | |
| ユーザー |
Jikky1618
|
| 提出日時 | 2024-10-12 20:19:01 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 971 bytes |
| コンパイル時間 | 3,833 ms |
| コンパイル使用メモリ | 263,792 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-12 20:19:07 |
| 合計ジャッジ時間 | 4,879 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 36 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#ifdef LOCAL
#include <debug_print.hpp>
#define debug(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__)
#else
#define debug(...) (static_cast<void>(0))
#endif
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
string S, T;
cin >> S >> T;
// A, A, B, B, AB, O
const map<string, string> blood = {{"AA", "A"}, {"AO", "A"}, {"BB", "B"}, {"BO", "B"}, {"AB", "AB"}, {"OO", "O"}};
// A, B, AB, O
map<string, int> P;
for (auto s : S) {
for (auto t : T) {
string data = string{s} + string{t};
if (data[0] > data[1]) swap(data[0], data[1]);
for (auto [key, value] : blood) {
if (data == key) {
P[value] += 25;
}
}
}
}
cout << P["A"] << " " << P["B"] << " " << P["AB"] << " " << P["O"] << '\n';
}
Jikky1618