|
|
вернуться в форумWhy TLE on test 7? I can't find mistakes. Please help! var m:array[1..10000]of string; m1:string; a,b,c,d,i,j,k:integer; begin readln(a); for i:=1 to a do readln(m[i]); readln(b); for i:=1 to b do begin c:=0; d:=100000000; readln(m1); for j:=1 to a do if((pos(m[j],m1)>0)) then begin c:=pos(m[j],m1); if(c<d)then d:=c; end; if(d<>100000000)then begin writeln(i,' ',d); exit; end; end; writeln('Passed'); end. Re: Why TLE on test 7? I can't understand! I use algorithm Aho-Korasic,but I have TLE on test7! Why? Can anybody send correct algorithm Aho-Korasic? P.S. Sorry for bad English. Edited by author 23.06.2011 16:27 Edited by author 29.06.2011 18:27 Re: Why TLE on test 7? Послано Juliet 27 июн 2011 14:46 Apply the GOOD JOB for College ACMers to Make Large Money and Become a Millionaire Hello, We need large no. of dedicated and hard working ACMers. The payment is good so we need ACMers to be efficient. All you have to do to get the job is to sign up at our websites. The link of our websites are given below. http://www.PaisaLive.com/register.asp?3556638-4847933 After the registration, a confirmation email will be sent to your specified email address. Please click on the link inside the confirmation email to activate your account and recieve ACM work instantly. For any other queries you can mail the administrator. Miss Juliet Admin paisalive.com |
|
|