結果
問題 |
No.717 ファッションへのこだわり
|
ユーザー |
|
提出日時 | 2020-06-19 22:51:25 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 327 bytes |
コンパイル時間 | 1,518 ms |
コンパイル使用メモリ | 169,612 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-03 15:20:36 |
合計ジャッジ時間 | 2,165 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 WA * 3 |
ソースコード
#include <bits/stdc++.h> #define _GLIBCXX_DEBUG #define rep(i,n) for(int i=0; i<(n); i++) using namespace std; #define all(x) (x).begin(),(x).end() int main(){ int n,m; cin>>n>>m; string s,t; cin>>s>>t; sort(all(s)); sort(all(t)); int a=min(n,m); int ans=0; rep(i,a){ if(s[i]==t[i]) ans++; } cout << ans << endl; }