結果
| 問題 | No.2920 Blood Type |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-12 20:19:01 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 481µs | |
| コード長 | 971 bytes |
| 記録 | |
| コンパイル時間 | 3,130 ms |
| コンパイル使用メモリ | 351,048 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-15 02:19:22 |
| 合計ジャッジ時間 | 4,260 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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';
}