Is this the case?? Are the solutions with same approach but different languages are getting different verdicts?? This is a matter of serious concern as this would cause unfair advantage to some. I would really hate this if something of this sort happens.
I guess this need strict action. Perhaps it should be made responsibility of problem tester to solve the problem with same approach using c++, python(PYPY or CPYTH) and Java, for these three languages are most popular ones. Hope this matter won’t go unnoticed.
Maybe vectors are the reason. Rest i didn’t exactly got the gist of your solution. Maybe u should try same solution using arrays, or add a bit of explanation about ur approach
I am not able to solve any of the last three problems (full solution). But i have texted someone to explain me approach of POLY. Whenever that person replies, i’ll solve the problem and then write editorial.
Waiting for that person’s reply.
If you can find anyone willing to explain his approach to me, i would be glad to write an editorial on any of last three problems and give him due credit as well.
@vijju123, Unluckily, That person got some unavoidable reasons, keeping that person busy, because of which I cannot do an editorial on POLY unless anyone else is willing to help me.
@taran_1407 you don’t necessarily have to make 2 segment trees. Since the working of the 2 segment trees is exactly the same, I made a class for segment trees and used 2 objects of that class as mentioned above. It made the code look clean and simple. Here’s the code.
One of the most unique and brilliant solution i have every heard, repeated application of sqrt decomposition to get query time O(1).
I would be glad to see ur submission. Thanks for sharing ur approach friend.
PS:if u r willing, i am recieving request for editorial of POLY, but wasn’t able to solve that one. If u r willing to share ur approach with me, that would be really helpful. Be assured, due credit will be given to u. If u urself want to write editorial, that would also be welcome. In case u r busy, no problem mate!!!
@taran_1407 There is lower_bound() function in the algorithms library which uses binary search on an iterator range. Here it’s a map/set method with the same name.
Well, I hope you convey this suggestion to admin. There should be proper testing in these three languages at least. No one should ever get undue advantage just because of a particular language.
Happens, mate. You are not the first one for this, nor you will be the last. I too wasted nearly 12 submissions (WA Segment tree ones) on CSUBQ because of a variable mistake. Just changed variable and got AC.