結果
| 問題 |
No.2920 Blood Type
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-12 14:35:59 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 507 bytes |
| コンパイル時間 | 1,910 ms |
| コンパイル使用メモリ | 193,600 KB |
| 最終ジャッジ日時 | 2025-02-24 17:36:37 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 36 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
string S;
cin >> S;
string T;
cin >> T;
int A = 0, B = 0, AB = 0, O = 0;
for (char c : S){
for (char d : T){
if ((c == 'A' and d != 'B') or (d == 'A' and c != 'B')){
A++;
} else if ((c == 'B' and d != 'A') or (d == 'B' and c != 'A')){
B++;
} else if ((c == 'A' and d == 'B') or (c == 'B' and d== 'A')){
AB++;
} else {
O++;
}
}
}
cout << 25 * A << ' ' << 25 * B << ' ' << 25 * AB << ' ' << 25 * O << endl;
}