|
|
вернуться в форумWhy I got WA?? Послано a 14 сен 2003 14:37 const t=600; n=30000; var a:array[1..30000]of word; time,point,address:word;ch:char; begin assign(input,'1.in'); reset(input); assign(output,'1.out'); rewrite(output); fillchar(a,sizeof(a),0); while not eof do begin read(time);read(ch);read(ch); if ch='+' then begin point:=0; repeat inc(point); if (a[point]<=time) then break; until false; a[point]:=time+600; writeln(point); end; if ch='.' then begin read(address); if a[address]<=time then writeln('-') else begin writeln('+'); a[address]:=time+600; end; end; end; close(input);close(output); end. |
|
|