結果

問題 No.717 ファッションへのこだわり
ユーザー face4
提出日時 2018-07-30 10:54:28
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 316 bytes
コンパイル時間 545 ms
コンパイル使用メモリ 68,396 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-13 13:49:34
合計ジャッジ時間 1,168 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
using namespace std;

int main(){
    int n, m;
    cin >> n >> m;
    string s, t;
    cin >> s >> t;
    cout << min(count(s.begin(), s.end(), 'A'), count(t.begin(), t.end(), 'A')) + min(count(s.begin(), s.end(), 'B'), count(t.begin(), t.end(), 'B')) << endl;
    return 0;
}
0