|
|
вернуться в форумС++ solve Послано DNS 9 авг 2010 23:45 Used scanf and printf becose i have DNS 1048 C++ Time limit exceeded 4 2.015 8 012 КБ whith cin and cout But, when i used scanf and printf i have DNS 1048 C++ Accepted 0.656 8 036 КБ Good luck Re: С++ solve Try ios::sync_with_stdio(false); and be happy Re: С++ solve Thanks so much!!! Exact same thing for me, and I would have never figured it out :) I didn't find the "ios::sync_with_stdio(false);" hint to help though... stayed too slow. Re: С++ solve Thanks! I got AC, but in 1.968 time using cin and cout. I spend o lot of time for optimization. Replacement cin to scanf gave 0.359 time in total :) Re: С++ solve try to use gets()+strtok()+atoi(), you will get better results ;) Used scanf and printf becose i have DNS 1048 C++ Time limit exceeded 4 2.015 8 012 КБ whith cin and cout But, when i used scanf and printf i have DNS 1048 C++ Accepted 0.656 8 036 КБ Good luck Re: С++ solve First time I used ios_base::sync_with_stdio(false) but many times I got TL on test 4, but changing cin and cout to the scanf and printf respectively, I got AC. |
|
|