結果
問題 | No.717 ファッションへのこだわり |
ユーザー |
![]() |
提出日時 | 2018-07-27 22:26:11 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 652 bytes |
コンパイル時間 | 718 ms |
コンパイル使用メモリ | 81,204 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 01:22:51 |
合計ジャッジ時間 | 1,291 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <cstdio> #include <cstring> #include <math.h> using namespace std; typedef long long ll; typedef double D; typedef pair<int,int> P; #define M 1000000007 #define F first #define S second #define PB push_back int n,m,a,b,c,d; int main(void){ cin>>n>>m; for(int i=0;i<n;i++){ char s; scanf(" %c",&s); if(s=='A')a++; else b++; } for(int i=0;i<m;i++){ char s; scanf(" %c",&s); if(s=='A')c++; else d++; } cout<<min(a,c)+min(b,d)<<endl; }