結果
| 問題 |
No.2920 Blood Type
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-28 23:22:22 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 2,000 ms |
| コード長 | 659 bytes |
| コンパイル時間 | 2,086 ms |
| コンパイル使用メモリ | 198,672 KB |
| 最終ジャッジ日時 | 2025-02-25 01:12:30 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 36 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, s, e) for (int i = (int)s; i < (int)e; ++i)
#define all(a) (a).begin(), (a).end()
int main() {
cin.tie(nullptr);
string S, T;
cin >> S >> T;
int a = 0, b = 0, ab = 0, o = 0;
rep(i, 0, 2) rep(j, 0, 2) {
set<char> s;
s.insert(S[i]);
s.insert(T[j]);
if (s.count('A') && s.count('B')) ab++;
else if (s.count('A')) a++;
else if (s.count('B')) b++;
else o++;
}
cout << a * 25 << ' ';
cout << b * 25 << ' ';
cout << ab * 25 << ' ';
cout << o * 25 << '\n';
}