๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Algorithm ๐Ÿง‘๐Ÿป‍๐Ÿ’ป/๋ฐฑ์ค€(BOJ)

[๋ฐฑ์ค€,c++] 11328๋ฒˆ - strfry

by dkswnkk 2021. 10. 27.
#include <iostream>
#include <algorithm>

using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    int N; cin >> N;

    while (N--) {
        string a, b; cin >> a >> b;

        sort(a.begin(), a.end());
        sort(b.begin(), b.end());
        if (a==b) cout << "Possible" << "\n";
        else cout << "Impossible" << "\n";
    }
}

๋Œ“๊ธ€