結果
問題 | No.2920 Blood Type |
ユーザー |
![]() |
提出日時 | 2024-10-12 14:34:58 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 505 bytes |
コンパイル時間 | 587 ms |
コンパイル使用メモリ | 70,476 KB |
最終ジャッジ日時 | 2025-02-24 17:35:46 |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 36 |
ソースコード
#include<iostream> #include<vector> using namespace std; int main() { string s,t; cin >> s >> t; int a=0,b=0,c=0,d=0; for(int i=0;i<s.size();i++)for(int j=0;j<t.size();j++){ if(s[i]=='A' && t[j]!='B')a++; else if(s[i]!='B' && t[j]=='A')a++; else if(s[i]=='B' && t[j]!='A')b++; else if(s[i]!='A' && t[j]=='B')b++; else if(s[i]=='A' && t[j]=='B')c++; else if(s[i]=='B' && t[j]=='A')c++; else d++; } cout << a*25 << " " << b*25 << " " << c*25 << " " << d*25 << endl; }