結果

問題 No.717 ファッションへのこだわり
ユーザー nxteru
提出日時 2018-07-27 22:25:19
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 652 bytes
コンパイル時間 741 ms
コンパイル使用メモリ 81,084 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-05 01:20:26
合計ジャッジ時間 1,230 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 3 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstring>
#include <math.h>
using namespace std;
typedef long long ll;
typedef double D;
typedef pair<int,int> P;
#define M 1000000007
#define F first
#define S second
#define PB push_back
int n,m,a,b,c,d;
int main(void){
    cin>>n>>m;
    for(int i=0;i<n;i++){
        char s;
        scanf(" %c",&s);
        if(s=='A')a++;
        else b++;
    }
    for(int i=0;i<m;i++){
        char s;
        scanf(" %c",&s);
        if(s=='A')c++;
        else d++;
    }
    cout<<min(a,d)+min(b,c)<<endl;
}
0