結果

問題 No.2920 Blood Type
ユーザー highlighter
提出日時 2024-10-12 14:36:28
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 723 bytes
コンパイル時間 2,893 ms
コンパイル使用メモリ 250,052 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-12 14:36:34
合計ジャッジ時間 3,877 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 36
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define int long long

bool check_A(string S){
	if(S=="AA" || S=="AB" || S=="AO"){
		return true;
	}
	return false;
}

bool check_B(string S){
	if(S=="AB" || S=="BB" || S=="BO"){
		return true;
	}
	return false;
}
int ans1,ans2,ans3,ans4;

signed main(){
	string S;
	string T;
	cin >> S;
	cin >> T;
	for(int i=0;i<2;i++){
		for(int j=0;j<2;j++){
			string U="TT";
			U[0]=S[i];
			U[1]=T[j];
			sort(U.begin(),U.end());
			if(check_A(U) && check_B(U)){
				ans3+=25;
				continue;
			}
			if(check_A(U)){
				ans1+=25;
				continue;
			}
			if(check_B(U)){
				ans2+=25;
				continue;
			}
			ans4+=25;
		}
	}
	cout << ans1 << " "<< ans2 << " " << ans3 << " " << ans4 << endl;
}
0