Since community always loves posts on fast IO. So what community wants is here.
Note: This is an undeclared million dollar and N-P Problem.
I would like to thank @vijju123 whose submission on BINSTR is inspiration behind this tutorial.
I claim that it is 25% faster.
Test done on Enormous Input Test problem.
One with usual fast I/O as done by most of users. 0.12
Even faster method 0.09
With file IO and above method. 0.09
Only difference between them is that 2nd solution takes input in form of string and then manually converts that into integer.
1 Like
Only difference between them is that 2nd solution takes input in form of string and then manually converts that into integer.
Taking input from file is not allowed. Remove those ifdefs and see.
And, where is the unofficial editorial of BINSTR that you promised?
I started writing that editorial but the reference solution I was using to write and editorial turned out to be a bruteforce solution which was exploiting weak testcases to get 33 pts As of now, I dropped that idea of writing unofficial editorial and mentioned that fast io technique which was used in that solution. That half written unofficial is already published here on this forum, you will have to search a bit. But I’m warning it is of not helpful so I made that post invisible. But because you have admin right so you can find that. Search forum.
Remove those ifdefs and see.
gives tle.
You dont write editorials using a 33 pt solution. A question once deleted is deleted. And no, I cant view “invisible post” as deleted posts are deleted after a certain timeline.
1 Like