Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <stack>
- #include <queue>
- #include <algorithm>
- using namespace std;
- int main()
- {
- ios_base::sync_with_stdio(false);
- int n;
- int answer = 0;
- cin >> n;
- for(int i = 0; i < n; i++) {
- string a, b;
- cin >> a >> b;
- sort(a.begin(), a.end());
- sort(b.begin(), b.end());
- if(a == b) {
- answer++;
- }
- }
- cout << answer << endl;
- return 0;
- }
- // ({})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement