2 Checker for NEERC'2009 Problem H: Headshot
\r
14 function NextOutput(var strm: InStream): String;
\r
16 Result := strm.ReadString;
\r
17 if (Result <> 'SHOOT') and (Result <> 'ROTATE') and (Result <> 'EQUAL') then
\r
18 strm.Quit(_PE, Format('Invalid string: %s', [Result]));
\r
19 if not strm.SeekEof then
\r
20 strm.Quit(_PE, 'Extra data in output');
\r
27 ja := NextOutput(ans);
\r
28 pa := NextOutput(ouf);
\r
31 Quit(_WA, Format('%s istead of %s', [pa, ja]));
\r
33 Quit(_OK, Format('%s', [pa]));
\r