結果
問題 |
No.717 ファッションへのこだわり
|
ユーザー |
![]() |
提出日時 | 2018-07-27 22:53:09 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 354 bytes |
コンパイル時間 | 1,705 ms |
コンパイル使用メモリ | 166,636 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-05 03:15:25 |
合計ジャッジ時間 | 2,024 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 4 WA * 6 |
ソースコード
#include<bits/stdc++.h> using namespace std; using Int = long long; //INSERT ABOVE HERE signed main(){ Int n,m; cin>>n>>m; string s,t; cin>>s>>t; Int cnt[2][2]={}; for(Int i=0;i<n;i++) cnt[0][s[i]-'A']++; for(Int i=0;i<m;i++) cnt[1][t[i]-'A']++; Int ans=min(cnt[0][0],cnt[0][1])+min(cnt[1][0],cnt[1][1]); cout<<ans<<endl; return 0; }