|
|
вернуться в форумWhy my program work so slow? I've only read and check, and don't read whole input. Why it work's less then 4 sek? [code deleted] Edited by author 26.01.2007 17:17 Re: Why my program work so slow? Use scanf instead of cin Input file is very big >10MB but better use Pascal:) I don't optimize input at all. It works about 1.3 sec After simple optimization 0.328 sec Edited by author 26.01.2007 16:15 Re: Why my program work so slow? Thank you! I've changed cin to scanf and got AC in 1.5 sec )) Re: Why my program work so slow? Try to use "gets()" instead "scanf()" and "cin". You can solve it with 2 strings (length = 2*m + 2). I've get AC at 0.156 sec. And some solution are faster. |
|
|