-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTECH04.cpp
45 lines (38 loc) · 827 Bytes
/
TECH04.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// @BEGIN_OF_SOURCE_CODE
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <list>
#include <vector>
#include <map>
#include <sstream>
#include <cmath>
#include <bitset>
#include <utility>
#include <set>
#define INT_MAX 2147483647
#define INT_MIN -2147483648
#define pi acos(-1.0)
#define N 1000000
#define LL long long
using namespace std;
int main ()
{
int testCase;
scanf ("%d", &testCase);
while ( testCase-- ) {
string first, second;
cin >> first >> second;
sort (first.begin (), first.end ());
sort (second.begin (), second.end ());
if ( first == second ) printf ("YES\n");
else printf ("NO\n");
}
return 0;
}
// @END_OF_SOURCE_CODE