結果
問題 |
No.717 ファッションへのこだわり
|
ユーザー |
![]() |
提出日時 | 2021-02-13 23:33:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 291 bytes |
コンパイル時間 | 1,790 ms |
コンパイル使用メモリ | 170,560 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-21 03:55:32 |
合計ジャッジ時間 | 2,395 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 WA * 3 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int N, M, ans = 0; string S, T; cin >> N >> M >> S >> T; sort(S.begin(), S.end()); sort(T.begin(), T.end()); for (int i = 0; i < min(N, M); i++) { if (S.at(i) == T.at(i)) ans++; } cout << ans << endl; }