結果
| 問題 | No.717 ファッションへのこだわり | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-07-27 23:40:18 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 3 ms / 2,000 ms | 
| コード長 | 260 bytes | 
| コンパイル時間 | 627 ms | 
| コンパイル使用メモリ | 67,100 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-05 05:40:13 | 
| 合計ジャッジ時間 | 1,238 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 10 | 
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    6 | main()
      | ^~~~
            
            ソースコード
#include<iostream>
#include<algorithm>
using namespace std;
string s,t;int n,m;
int sa,sb,ta,tb;
main()
{
	cin>>n>>m>>s>>t;
	for(int i=0;i<s.size();i++)(s[i]=='A'?sa:sb)++;
	for(int i=0;i<t.size();i++)(t[i]=='A'?ta:tb)++;
	cout<<min(sa,ta)+min(sb,tb)<<endl;
}
            
            
            
        