結果
| 問題 |
No.2920 Blood Type
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-12 14:33:04 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 634 bytes |
| コンパイル時間 | 2,122 ms |
| コンパイル使用メモリ | 197,984 KB |
| 最終ジャッジ日時 | 2025-02-24 17:34:27 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 36 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
string s, t;
cin >> s >> t;
vector<int> ans(4);
for(int i = 0; i < 2; i++){
for(int j = 0; j < 2; j++){
string u;
u += s[i];
u += t[j];
sort(u.begin(), u.end());
if(u == "AA" || u == "AO") ans[0] += 25;
else if(u == "BB" || u == "BO") ans[1] += 25;
else if(u == "AB") ans[2] += 25;
else ans[3] += 25;
}
}
for(int i = 0; i < 4; i++){
cout << ans[i] << (i == 3 ? '\n' : ' ');
}
}