結果
| 問題 |
No.717 ファッションへのこだわり
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-19 23:06:21 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 350 bytes |
| コンパイル時間 | 1,522 ms |
| コンパイル使用メモリ | 167,032 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-03 15:30:42 |
| 合計ジャッジ時間 | 2,055 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i,n) for(int i=0; i<(n); i++)
using namespace std;
int main(){
int n,m; cin>>n>>m;
string s,t; cin>>s>>t;
int sa=0; int sb=0;
rep(i,n){
if(s[i]=='A') sa++;
else sb++;
}
int ta=0; int tb=0;
rep(i,m){
if(t[i]=='A') ta++;
else tb++;
}
cout << min(sa,ta)+min(sb,tb) << endl;
}