結果

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

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;
#define fastcin {\
    cin.tie(0);\
    ios::sync_with_stdio(false);\
}
#define rep(i, a, b) for(int i = a; i < b; i++)
#define print(x) cout << x << "\n"

int main() {
    fastcin;
    int n, m;
    cin >> n >> m;
    string s, t;
    cin >> s >> t;
    int ans = 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'));
    print(ans);
    return 0;
}
0