結果
問題 | No.2920 Blood Type |
ユーザー | s k |
提出日時 | 2024-10-17 17:22:46 |
言語 | C++23(gcc13) (gcc 13.2.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 3,762 bytes |
コンパイル時間 | 4,075 ms |
コンパイル使用メモリ | 283,428 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-17 17:22:51 |
合計ジャッジ時間 | 5,046 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,820 KB |
testcase_01 | AC | 1 ms
6,820 KB |
testcase_02 | AC | 2 ms
6,820 KB |
testcase_03 | AC | 1 ms
6,820 KB |
testcase_04 | AC | 2 ms
6,816 KB |
testcase_05 | AC | 2 ms
6,820 KB |
testcase_06 | AC | 2 ms
6,820 KB |
testcase_07 | AC | 2 ms
6,820 KB |
testcase_08 | AC | 1 ms
6,816 KB |
testcase_09 | AC | 1 ms
6,820 KB |
testcase_10 | AC | 1 ms
6,816 KB |
testcase_11 | AC | 2 ms
6,816 KB |
testcase_12 | AC | 2 ms
6,816 KB |
testcase_13 | AC | 2 ms
6,820 KB |
testcase_14 | AC | 2 ms
6,820 KB |
testcase_15 | AC | 2 ms
6,820 KB |
testcase_16 | AC | 2 ms
6,816 KB |
testcase_17 | AC | 2 ms
6,816 KB |
testcase_18 | AC | 2 ms
6,820 KB |
testcase_19 | AC | 1 ms
6,816 KB |
testcase_20 | AC | 1 ms
6,820 KB |
testcase_21 | AC | 2 ms
6,816 KB |
testcase_22 | AC | 2 ms
6,816 KB |
testcase_23 | AC | 2 ms
6,816 KB |
testcase_24 | AC | 1 ms
6,816 KB |
testcase_25 | AC | 2 ms
6,816 KB |
testcase_26 | AC | 2 ms
6,820 KB |
testcase_27 | AC | 2 ms
6,816 KB |
testcase_28 | AC | 2 ms
6,816 KB |
testcase_29 | AC | 2 ms
6,816 KB |
testcase_30 | AC | 2 ms
6,816 KB |
testcase_31 | AC | 2 ms
6,816 KB |
testcase_32 | AC | 2 ms
6,816 KB |
testcase_33 | AC | 1 ms
6,820 KB |
testcase_34 | AC | 2 ms
6,820 KB |
testcase_35 | AC | 2 ms
6,820 KB |
ソースコード
#include<bits/stdc++.h>//#define _GLIBCXX_DEBUG using namespace std;using ll=__int128_t; template<class T> using V = vector<T>; using ld=long double;using Pa=pair<ll,ll>; using Vll=vector<ll>; using VVll=vector<Vll>; using VVVll=vector<VVll>; using Vb=vector<bool>; using VVb=vector<vector<bool>>; using Vs=vector<string>; using VVs=vector<vector<string>>; using Vc=vector<char>; using VVc=vector<vector<char>>; using Vd=vector<long double>; using VVd=vector<vector<long double>>; const ll MOD=1000000007; const ll INF=(ll)1<<60; ll ceil(ll a, ll b){ return (a+b-1)/b; } ll max(ll a, ll b){ if(a>=b) return a; else return b; }ll min(ll a, ll b){ if(a<=b) return a; else return b; } bool bit(ll s, ll j){ if(s&(1<<j)) return true; return false;} ll nizyo(ll x){return (x)*(x);}template<class t,class u> bool chmax(t&a,u b){if(a<b){a=b; return true;} else{return false;}}template<class t,class u> bool chmin(t&a,u b){if(b<a){a=b; return true;} else{return false;}} istream& operator>>(istream& is, __int128_t & v){ string s; is >> s; v = 0; for(int i=0; i<(int)s.size(); i++){ if (isdigit(s[i])){ v=v*10+s[i]-'0'; } }if(s[0]=='-') { v *= -1;} return is; } std::ostream &operator<<(std::ostream &dest, __int128_t value){ std::ostream::sentry s(dest); if(s){ __uint128_t tmp = value < 0 ? -value : value; char buffer[128]; char *d = std::end(buffer); do{ --d; *d="0123456789"[tmp%10]; tmp/=10; } while(tmp != 0); if(value<0){ --d; *d = '-'; } int len = std::end(buffer)-d; if (dest.rdbuf()->sputn(d, len)!=len){ dest.setstate(std::ios_base::badbit); } } else{cout<<0;} return dest; } string to_string(ll a){ string res=""; while(a>0){ ll b=a%10; char c='0'+b; res+=c; a/=10; } reverse(res.begin(),res.end()); return res; }void OIV(){}template<typename T> void OIV(T &a){if(a.empty()){cout<<"\n"; return;} for(ll ii0=0;ii0<(ll)(a).size();ii0++){cout<<a[ii0]; if(ii0==(ll)(a).size()-1){cout<<"\n";} else{cout<<" ";}}}void OIVV(){}template<typename T> void OIVV(T &a){if(a.empty()){cout<<"\n"; return;}for(ll ii0=0;ii0<(ll)(a).size();ii0++){for(ll jj0=0;jj0<(ll)((a)[ii0]).size();jj0++){cout<<(a)[ii0][jj0]; if(jj0==(ll)((a)[ii0]).size()-1){cout<<"\n";}else{cout<<" ";}}}}void oi(){}template<class Head, class... Tail>void oi(Head&& head,Tail&&... tail){if(sizeof...(tail)!=0){cerr<<head<<" ";} else{cerr<<head<<"\n";}oi(move(tail)...);}void OI(){}template<class Head, class... Tail>void OI(Head&& head,Tail&&... tail){if(sizeof...(tail)!=0){cout<<head<<" ";} else{cout<<head<<"\n";}OI(move(tail)...);} void oiv(){}template<typename T> void oiv(T &a){if(a.empty()){cerr<<"\n"; return;} for(ll ii0=0;ii0<(ll)(a).size();ii0++){cerr<<a[ii0]; if(ii0==(ll)(a).size()-1){cerr<<"\n";} else{cerr<<" ";}}} void ois(){}template<typename T> void ois(T &(a)){if((a).empty()){cerr<<"\n"; return;} auto it=(a).begin(); while(it!=a.end()){ cerr<<*it; it++; if(it!=a.end()){cerr<<" ";}else{cerr<<"\n";}}} void oivv(){}template<typename T> void oivv(T &a){if(a.empty()){cerr<<"\n"; return;}for(ll ii0=0;ii0<(ll)(a).size();ii0++){for(ll jj0=0;jj0<(ll)((a)[ii0]).size();jj0++){cerr<<(a)[ii0][jj0]; if(jj0==(ll)((a)[ii0]).size()-1){cerr<<"\n";}else{cerr<<" ";}}}} #define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)// printf("%8.10Lf\n",(ans)); #define ALL(a) (a).begin(),(a).end()// Vll A(n); FOR(i,0,n) cin>>A[i]; int main(){ string S,T; cin>>S>>T; Vll A(4,0); FOR(i,0,2){ char c=S[i]; FOR(j,0,2){ char d=T[j]; set<char> C; C.insert(c); C.insert(d); if(C.count('A') and !C.count('B')) A[0]+=25; else if(C.count('B') and !C.count('A')) A[1]+=25; else if(C.count('B') and C.count('A')) A[2]+=25; else A[3]+=25; } } OIV(A); return 0; }