結果
問題 | No.2920 Blood Type |
ユーザー |
|
提出日時 | 2024-10-12 14:35:59 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 507 bytes |
コンパイル時間 | 2,138 ms |
コンパイル使用メモリ | 202,252 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-12 14:36:17 |
合計ジャッジ時間 | 3,237 ms |
ジャッジサーバー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; }