Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uses
- SysUtils, unJudge17;
- var
- i : longint;
- ja, pa : string;
- function compress(s : string) : string;
- begin
- if length(s) < 100 then compress := s else compress := copy(s, 1, 50) + '..' + copy(s, length(s) - 24, 50);
- end;
- begin
- pa := ouf.readString();
- ja := ans.readString();
- i := length(pa);
- while (i > 0) and (pa[i] = ' ') do dec(i);
- delete(pa, i + 1, length(pa) - i);
- i := length(ja);
- while (i > 0) and (ja[i] = ' ') do dec(i);
- delete(ja, i + 1, length(ja) - i);
- if pa <> ja then quit(_wa, 'Expected: "' + compress(ja) + '", found: "' + compress(pa) + '"');
- if not ouf.seekEOF() then quit(_wa, 'Extra lines! "' + ouf.readString() + '" encountered');
- quit(_ok, '1 line');
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement