|
|
back to boardHelp! Why my program got WA at test1??? Posted by Tang RZ 30 May 2004 11:17 var total:longint; n,m,year:longint; a:array [1..15000] of longint; procedure work(year:longint); var i:integer; begin for i:=1 to n do if a[i]>year then break else if a[i]=year then inc(total); end; procedure init; var i:integer; begin read(n); for i:=1 to n do read(a[i]); read(m); for i:=1 to m do begin read(year); work(year); end; end; procedure print; begin writeln(total); end; begin init; print; end. Re: Help! Why my program got WA at test1??? Posted by Tang RZ 16 Jul 2004 09:59 I'v got AC. 0.843s Edited by author 16.07.2004 10:48 yours wrong your program gets WA with test#1 |
|
|