#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";
}
}
'Algorithm ๐ง๐ปโ๐ป > ๋ฐฑ์ค(BOJ)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค,c++] 11399๋ฒ - ATM (0) | 2021.10.27 |
---|---|
[๋ฐฑ์ค,c++] 1138๋ฒ - ํ ์ค๋ก ์๊ธฐ (0) | 2021.10.27 |
[๋ฐฑ์ค,c++] 11365๋ฒ - !๋ฐ๋น ๊ธ์ผ (0) | 2021.10.27 |
[๋ฐฑ์ค,c++] 11286๋ฒ - ์ ๋๊ฐ ํ (0) | 2021.10.27 |
[๋ฐฑ์ค,c++] 11279๋ฒ - ์ต๋ ํ (0) | 2021.10.27 |
[๋ฐฑ์ค,c++] 11123๋ฒ - ์ ํ๋ง๋ฆฌ... ์ ๋๋ง๋ฆฌ... (0) | 2021.10.27 |
๋๊ธ