結果
| 問題 |
No.717 ファッションへのこだわり
|
| コンテスト | |
| ユーザー |
troro_kelp
|
| 提出日時 | 2018-08-12 17:31:57 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 658 bytes |
| コンパイル時間 | 733 ms |
| コンパイル使用メモリ | 79,492 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-24 07:28:45 |
| 合計ジャッジ時間 | 1,666 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 3 WA * 7 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <stack>
#include <map>
#include <queue>
#include <numeric>
#include <climits>
#include <iterator>
#include <bitset>
#include <functional>
using namespace std;
const constexpr int INF = 1e9;
long long N, M;
int y, m, d;
string S, T;
void solve(){
int sa=0, sb=0, ta=0, tb=0;
for(int i=0; i<S.size(); ++i){
if(S[i]=='A') sa++;
else sb++;
}
for(int i=0; i<T.size(); ++i){
if(T[i]=='A') ta++;
else tb++;
}
cout << min(sa, ta) + min(ta, tb) << endl;
}
int main() {
cin >> N >> M >> S >> T;
solve();
return 0;
}
troro_kelp