Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- count1, count2:array [1..26] of char;
- s1, s2, s3:string;
- i:integer;
- begin
- readln(s1);
- readln(s2);
- readln(s3);
- for i := 1 to length(s1) do
- inc(count1[ord(s1[i]) - 'A' + 1]);
- for i := 1 to length(s2) do
- inc(count1[ord(s2[i]) - 'A' + 1]);
- for i := 1 to length(s3) do
- inc(count2[ord(s3[i]) - 'A' + 1]);
- for i := 1 to 26 do
- if (count1[i] <> count2[i]) then
- begin
- writeln('NO');
- exit;
- end;
- writeln('YES');
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement