結果
| 問題 |
No.717 ファッションへのこだわり
|
| コンテスト | |
| ユーザー |
aguroshou
|
| 提出日時 | 2018-07-27 22:31:23 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,003 bytes |
| コンパイル時間 | 806 ms |
| コンパイル使用メモリ | 69,912 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-05 01:40:51 |
| 合計ジャッジ時間 | 3,260 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#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;
}
aguroshou