結果

問題 No.2920 Blood Type
ユーザー srjywrdnprkt
提出日時 2024-10-14 23:41:26
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 646 bytes
コンパイル時間 2,484 ms
コンパイル使用メモリ 205,392 KB
最終ジャッジ日時 2025-02-24 19:39:11
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 36
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

int main(){
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);

    map<string, int> mp;
    mp["AO"] = 0;
    mp["AA"] = 0;
    mp["OA"] = 0;
    mp["BO"] = 1;
    mp["BB"] = 1;
    mp["OB"] = 1;
    mp["AB"] = 2;
    mp["BA"] = 2;
    mp["OO"] = 3;
    string S, T, U;
    cin >> S >> T;
    vector<int> v(4);
    for (int i=0; i<2; i++){
        for (int j=0; j<2; j++){
            U = "";
            U += S[i];
            U += T[j];
            v[mp[U]]++;
        }
    }
    for (int i=0; i<4; i++) cout << v[i]*25 << " ";
    cout << endl;

    return 0;
}
0