Need Help regarding TLE - Codeforces
source link: http://codeforces.com/blog/entry/97954
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
15 minutes ago, # |
Use these two lines for fast IO at the start of the main function (can look at the below code).
ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cerr.tie(0);
I submitted the same code as yours for finding the errors; your code was correct. Your code with fast IO You can read this for Theory for fast IO
I also faced some similar types of issues. I used endl instead of "\n" and got TLE on 9 TC too.
Happy Coding :)
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK