結果
| 問題 |
No.2920 Blood Type
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-11-17 17:34:13 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,349 bytes |
| コンパイル時間 | 2,805 ms |
| コンパイル使用メモリ | 277,576 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-17 17:34:21 |
| 合計ジャッジ時間 | 3,672 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 36 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/fenwicktree>
using namespace atcoder;
// using mint = modint998244353;
using namespace std;
using ll = long long;
const int INF = 1001001001;
const ll LINF = 3001001001001001001;
const int MOD = 998244353;
const string Yes = "Yes";
const string No = "No";
#define reps(i, a, n) for (ll i = (a); i < (ll)(n); ++i)
#define rep(i, n) reps(i, 0, n)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
template<typename T> bool chmin(T& a, T b){if(a > b){a = b; return true;} return false;}
template<typename T> bool chmax(T& a, T b){if(a < b){a = b; return true;} return false;}
template<typename T> istream &operator>>(istream &is, vector<T> &v) {for (T &in : v)is >> in;return is;}
// #include <ext/pb_ds/assoc_container.hpp>
// template<typename T>
// using ordered_set = __gnu_pbds::tree<T, null_type, std::less<T>, rb_tree_tag, tree_order_statistics_node_update>;
int main() {
string s,t;cin>>s>>t;
vector<int> cnt(4,0);//A B AB O
rep(i,2) rep(j,2) {
bool a = s.at(i)=='A'||t.at(j)=='A';
bool b = s.at(i)=='B'||t.at(j)=='B';
if(a&&!b) cnt.at(0)++;
else if(b&&!a) cnt.at(1)++;
else if(a&&b) cnt.at(2)++;
else cnt.at(3)++;
}
rep(i,4) cnt.at(i) *= 25;
rep(i,4) {
if(i) cout << " ";
cout << cnt.at(i);
}
cout << endl;
return 0;
}