結果

問題 No.717 ファッションへのこだわり
ユーザー aguroshouaguroshou
提出日時 2018-07-27 22:31:23
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,003 bytes
コンパイル時間 637 ms
コンパイル使用メモリ 69,608 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-18 09:59:31
合計ジャッジ時間 1,498 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 2 ms
4,376 KB
testcase_12 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include <algorithm>
#include<string>
#include <bitset>
#include <vector>
#include <functional>
#include <climits>
#include <iomanip>
#include <utility>
using namespace std;
typedef pair <int, int> pii;
int main()
{

	//int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, ans = 0;
	int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = 0, j = 0, k = 0, l = 0, ans = 0;
	//cout << LONG_MAX << endl;
	string s, t;
	//long long n, A[1000000000];
	long long n, m;
	//int   y[100001], z[100001], x[10001] = {};
	//pii y[100001];
	//pair<int, float> pii[100001];
	int x[1003];
	cin >> n;
	cin >> m;
	//string s;
	cin >> s;
	for (a = 0; a < s.length(); a++)
	{
		if (s[a] == 'A')
		{
			b++;
		}
		else
		{
			c++;
		}
	}
	cin >> s;
	for (a = 0; a < s.length(); a++)
	{
		if (s[a] == 'A')
		{
			d++;
		}
		else
		{
			e++;
		}
	}
	f += min(b, d);
	f += min(c, e);
	////std::cout << std::fixed;
	//cout << std::setprecision(20) << << endl;
	cout << f << endl;

	return 0;
}
0