結果
問題 | No.2920 Blood Type |
ユーザー |
|
提出日時 | 2024-10-12 16:54:36 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 824 bytes |
コンパイル時間 | 2,909 ms |
コンパイル使用メモリ | 252,672 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 16:54:48 |
合計ジャッジ時間 | 3,813 ms |
ジャッジサーバーID (参考情報) |
judge / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 36 |
ソースコード
#include <bits/stdc++.h>using namespace std;#include <atcoder/modint>using namespace atcoder;#ifdef DEFINED_ONLY_IN_LOCAL#include <dump.hpp>#define dump(...) cpp_dump(__VA_ARGS__)#else#undef dump#define dump(...)#endif#define rep(i, n) for (int i = 0; i < n; i++)template <class T> istream& operator>>(istream& I, vector<T>& V) { for (T& X : V) I >> X; return I; }int main() {string s, t;cin >> s >> t;vector<int> ans(4);rep(i, 2) rep(j, 2) {string cur;cur += s[i]; cur += t[j];sort(cur.begin(), cur.end());if (cur == "AA" or cur == "AO") ans[0] += 25;if (cur == "BB" or cur == "BO") ans[1] += 25;if (cur == "AB") ans[2] += 25;if (cur == "OO") ans[3] += 25;}rep(i, 4) cout << ans[i] << " \n"[i == 3];return 0;}