結果
| 問題 |
No.717 ファッションへのこだわり
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-31 11:45:18 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 259 bytes |
| コンパイル時間 | 2,041 ms |
| コンパイル使用メモリ | 81,948 KB |
| 実行使用メモリ | 71,228 KB |
| 最終ジャッジ日時 | 2024-12-20 21:50:46 |
| 合計ジャッジ時間 | 2,335 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 RE * 1 |
| other | AC * 8 RE * 2 |
ソースコード
n,m=map(int,input().split())
s=list(map(lambda x:x,input()))
t=list(map(lambda x:x,input()))
p={}
q={}
for i in s:
p[i]=p[i]+1 if i in p.keys() else 1
for i in t:
q[i]=q[i]+1 if i in q.keys() else 1
ans=min(p['A'],q['A'])+min(p['B'],q['B'])
print(ans)