結果
| 問題 |
No.2920 Blood Type
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-12 14:42:32 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 559 bytes |
| コンパイル時間 | 1,613 ms |
| コンパイル使用メモリ | 168,872 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-12 14:42:48 |
| 合計ジャッジ時間 | 2,572 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 36 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
string s,t;
cin >> s >> t;
vector<int> c(4,0);
for(int i = 0; i < 2; i++) for(int j = 0; j < 2; j++) {
vector<int> x(3,0);
if(s[i] == 'A') x[0]++;
else if(s[i] == 'B') x[1]++;
else x[2]++;
if(t[j] == 'A') x[0]++;
else if(t[j] == 'B') x[1]++;
else x[2]++;
if(x[0] > 0 && x[1] == 0) c[0]++;
else if(x[0] == 0 && x[1] > 0) c[1]++;
else if(x[0] > 0 && x[1] > 0) c[2]++;
else c[3]++;
}
for(int i = 0; i < 4; i++) cout << c[i]*25 << ' ';
cout << endl;
}