結果
問題 | No.2920 Blood Type |
ユーザー |
![]() |
提出日時 | 2024-10-12 14:34:30 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,060 bytes |
コンパイル時間 | 5,826 ms |
コンパイル使用メモリ | 337,616 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 14:34:40 |
合計ジャッジ時間 | 6,771 ms |
ジャッジサーバーID (参考情報) |
judge / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 36 |
ソースコード
#include<bits/stdc++.h>#include<atcoder/all>#define chmin(x,y) (x) = min((x),(y))#define chmax(x,y) (x) = max((x),(y))zusing namespace std;using namespace atcoder;using ll = long long;const ll mod = 998244353;using mint = modint998244353;using Graph = vector<vector<pair<int,ll>>>;const vector<int> dx = {1,0,-1,0}, dy = {0,1,0,-1};double dist(int x1, int y1, int x2, int y2){double res = (x1-x2) * (x1-x2) + (y1-y2) * (y1-y2);return sqrt(res);}ll need(ll n, ll m){ll res = 0;if(n < 0) return res;res = n / m;if(n % m > 0) res++;return res;}int main(){// inputstring s,t;cin >> s >> t;map<string,int> mp;// solvefor(int i = 0; i < 2; i++){for(int j = 0; j < 2; j++){char u = s[i], v = t[j];if(u > v) swap(u,v);string type;type += u;type += v;mp[type] += 25;}}// outputmp["A"] = mp["AA"] + mp["AO"];mp["B"] = mp["BB"] + mp["BO"];cout << mp["A"] << " " << mp["B"] << " " << mp["AB"] << " " << mp["OO"] << endl;}