-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchkcomps.pas
30 lines (30 loc) · 1.08 KB
/
chkcomps.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{Checker: standard}
{Checker details: compare any number of 64-bit integers}
{Origin: testlib-kitten, chkcomps.pas}
{URL: http://acm.math.spbu.ru/soft/testlib}
{$I trans.inc}
{$Q+}
program macro;
uses testlib;
var jury, cont:extended;
count:longint;
begin
count:=0;
while not ans.seekeof do begin
if ouf.seekeof then quit (_Wa, '¥®¦¨¤ ë© ª®¥æ ä ©« ãç á⨪ ');
ans.sp;
jury:=ans.readreal;
cont:=ouf.readreal;
//jury64:=jury; // check if the jury answer fits in a signed 64-bit integer
//if jury64<>jury then quit (_fail, 'Out of bounds:'+r2s (jury));
inc (count);
if int (jury)<>jury then quit (_fail, '¥æ¥«®¥ ç¨á«®: '+r2s (jury));
if int (cont)<>cont then quit (_pe, '¥æ¥«®¥ ç¨á«®: '+r2s (cont));
if jury<>cont then quit (_wa,
'Žè¨¡ª ¢ ç¨á«¥ #'+i2s (count)+' (¯®§¨æ¨ï ¢ ä ©«¥ ¦îਠ'+
ans.spp +') ' +
'’ॡ®¢ «®áì '+cp2s (jury)+', ¯®«ã祮 '+cp2s (cont));
end;
if not ouf.seekeof then quit (_wa, '‹¨èïï ¨ä®à¬ æ¨ï ¢ ®â¢¥â¥ ãç á⨪ ');
QUIT (_OK, i2s (count) + ' ' + RussianEnding (count, 'ç¨á«®', 'ç¨á« ', 'ç¨á¥«'));
end.