結果
問題 | No.717 ファッションへのこだわり |
ユーザー |
![]() |
提出日時 | 2018-07-28 10:50:50 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 351 bytes |
コンパイル時間 | 550 ms |
コンパイル使用メモリ | 66,664 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 18:17:31 |
合計ジャッジ時間 | 1,130 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 10 |
ソースコード
#include <string>#include <iostream>#include <algorithm>using namespace std;int main() {int N, M; string s, t;cin >> N >> M >> s >> t;int sa = 0, ta = 0;for (int i = 0; i < N; ++i) sa += (s[i] == 'A');for (int i = 0; i < M; ++i) ta += (t[i] += 'A');int sb = N - sa, tb = M - sb;cout << min(sa, ta) + min(sb, tb) << '\n';return 0;}