Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define task "HOHANG"
- #include <iostream>
- #include <cstdio>
- using namespace std;
- using ll = long long;
- using ld = long double;
- constexpr int N = 1e5 + 5;
- string S1, S2;
- int cntS1[30], cntS2[30];
- void Read()
- {
- cin >> S1 >> S2;
- }
- void Solve()
- {
- for (auto i : S1)
- ++cntS1[i - 'a'];
- for (auto i : S2)
- ++cntS2[i - 'a'];
- int ans(0);
- for (int i = 0; i < 26; ++i)
- if ((cntS1[i] > 0) != (cntS2[i] > 0))
- ans += cntS1[i] + cntS2[i];
- cout << ans;
- }
- int32_t main()
- {
- ios::sync_with_stdio(0);
- cin.tie(0);
- cout.tie(0);
- if (fopen(task ".INP", "r"))
- {
- freopen(task ".INP", "r", stdin);
- freopen(task ".OUT", "w", stdout);
- }
- Read();
- Solve();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement