結果
| 問題 | No.717 ファッションへのこだわり | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-07-27 23:31:08 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 386 bytes | 
| コンパイル時間 | 568 ms | 
| コンパイル使用メモリ | 70,840 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-05 05:26:42 | 
| 合計ジャッジ時間 | 1,141 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 10 | 
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
int main() {
  int n, m;
  string s, t;
  cin >> n >> m >> s >> t;
  int A0 = count(s.begin(), s.end(), 'A');
  int B0 = count(s.begin(), s.end(), 'B');
  int A1 = count(t.begin(), t.end(), 'A');
  int B1 = count(t.begin(), t.end(), 'B');
  cout << min(A0, A1) + min(B0, B1) << endl;
}
            
            
            
        