2 Checker for NEERC'2006 Problem Z: Zero-complexity Transposition
\r
17 n := inf.readInteger;
\r
20 for i := 1 to n do begin
\r
21 if ouf.SeekEoln then
\r
22 Quit(_PE, 'Unexpected line end');
\r
24 ja := ans.readWord(blanks, blanks);
\r
25 pa := ouf.readWord(blanks, blanks);
\r
27 for j := 1 to Length(pa) do begin
\r
28 if not (pa[j] in ['-', '0'..'9']) then
\r
29 Quit(_PE, 'Invalid character');
\r
32 if (wa = '') and (ja <> pa) then
\r
33 wa := Format('%s instead of %s', [pa, ja]);
\r
36 if not ouf.SeekEof then
\r
37 Quit(_PE, 'Extra information in the output file');
\r
42 Quit(_OK, Format('%d', [n]));
\r