Is this a good thing that a Simple Library in Python is giving a simple solution in just 2-3 Lines as shown in This Solution. Where are PRO’s have to type the whole code for FFT etc as Mr. @gennady.korotkevich or Mr. @uwi did in his solution given here and here.
Yes. This is grossly unfair. The same happened with the problem NQNF.
Raise this question on invitation to this contest… It is more likely that admin checks it… Instead of a separate question…
Personally, I believe CodeChef is like a war field. You choose your own weapon.
Some prefer modern weapons and some, primitive weapons.
We always have an option to change our weapons, any time.
I would say that the root of unfairness is having weird rules which allow some solution to be accepted despite not working within TL.
“Custom multipliers for languages” is the thing which is a sign of “I want a job” site, not a competitive programming site. It gets even more funny to see how this kind of thing gives advantage in the contest which is about prize bonuses for ICPC - competition that doesn’t have that kind of weird rules.
I’m looking at solution that you posted and I see that it works almost 8 seconds. TL for this problem is 2 seconds. I would say that stuff is fair either if this solution is judged as TLE or if C++ solutions working below 10 seconds are getting AC. I’m not very positive about Java x2, but this Python thing is simply ridiculous.
Now if we say that you can’t buy more time by using a different language - under such constraints I would say it is totally fair to use whatever the language provides, because now it is actually up to you to pick the most suitable instrument to get things done.
I feel you can use any language of your choice and it is up to you to use that language’s features efficiently. Although I wonder how codechef can allow users to use numpy module and hope that other modules are prohibited for use.
We all use sort() function in almost every language even if someone doesn’t know the implementation behind it. I remember there are two function in C++ to implement binary search - lower_bound() and upper_bound(), now Python doesn’t have module related to it, But it’s totally fair.
Some good programmers have their codes(templates) saved beforehand for various algorithms like dijkstra, kruskal, segment tree and they solve the problem using it with slight modification, we don’t consider it unfair too.
At the end of the day it's more about one's expertise in his particular choice of language than being unfair. Codechef should take care of these sort of things.
Python does have the equivalents of
upper_bound. They are in the
yeah u are right!
It is a time limit problem for PYTH 3.6 that is set too high.
Actually I just meant there may be things or features you don’t know about a particular language and you will code it anyway unknowingly :p. I didn’t know about bisect, thanks @meooow ;-).
And yeah,@hideintree same algo in python do require 5x more time than C/C++ programs, Please suggest solution if there is any.
Please dude. This gave me cancer.
One point which nobody touched upon.
The worst case according to me -
I think this is complexity for 8 line code - O(Q*N*logN).
How it is passing ??
Either test cases are weak enough or I’m missing something.
And the worst part is nothing is written about x,y,l. What will happen if x+l-1 is out of bound?
Or I’m missing something??
Yeah. Weak test cases and wrong time limit.
And today @hideintree, I found out that this is not the only case where this happened, here is the link. It is a segment tree problem and this python code is just 20 lines where the user just used brute force. While solutions were quite long specially in C/C++/Java.
I think codechef needs to pay attention in this matter, as it’s not the proper solution that can be justified for AC. They should not allow the use of numpy. @admin please look into it.
The problem is more that numpy is even available for python, imo it really shouldn’t be. There really is no reason to have more than standard libraries available. Without it the time limits are more or less fair. In fact even with a correct implementation python can often be too slow because…well it’s python. And even as an avid python user I think that’s perfectly fair and I’ll happily switch to C++ when I actually need the raw performance.
Do u still think @admin is going to do anything? They still haven’t replied yet.