-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathamusing-joke.cpp
More file actions
48 lines (48 loc) · 1013 Bytes
/
Copy pathamusing-joke.cpp
File metadata and controls
48 lines (48 loc) · 1013 Bytes
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
46
47
48
#include <iostream>
using namespace std;
int main()
{
string s, s1, s2;
cin >> s1 >> s2 >> s;
string s3 = s1 + s2;
int flag;
if (s.length() == s3.length())
{
for (int i = 0; i < 26; i++)
{
int count = 0, count1 = 0;
char ch = 65 + i;
for (int j = 0; j < s.length(); j++)
{
if (ch == s[j])
{
count++;
}
}
for (int a = 0; a < s3.length(); a++)
{
if (ch == s3[a])
{
count1++;
}
}
if (count1 == count)
{
flag = 1;
continue;
}
else
{
flag = 0;
break;
}
}
if (flag == 1)
cout << "YES\n";
else
cout << "NO\n";
}
else
cout << "NO\n";
return 0;
}