SHARE
TWEET

Untitled

a guest Jan 13th, 2013 202 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. var
  3.         count1, count2:array [1..26] of char;
  4.         s1, s2, s3:string;
  5.         i:integer;
  6. begin
  7.         readln(s1);
  8.         readln(s2);
  9.         readln(s3);
  10.         for i := 1 to length(s1) do
  11.                 inc(count1[ord(s1[i]) - 'A' + 1]);
  12.         for i := 1 to length(s2) do
  13.                 inc(count1[ord(s2[i]) - 'A' + 1]);
  14.         for i := 1 to length(s3) do
  15.                 inc(count2[ord(s3[i]) - 'A' + 1]);
  16.         for i := 1 to 26 do
  17.                 if (count1[i] <> count2[i]) then
  18.                 begin
  19.                         writeln('NO');
  20.                         exit;
  21.                 end;
  22.         writeln('YES');
  23. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top