it happens
the tester is not responsible for writing the code in every lang
do u know every lang ?
sad truth man but java is not for CP
I too use java and face this issue in CP
It depends on you/me how you code and how much knowledge you/me have about the language.
eg: better example Arrays.sort() in java…
Exactly!!
Faced the same problem
I guess. Or probably Treeset in JAVA. I got a TLE when i used TreeSet in a recent contest on codechef
You are correct, but if codechef keeps multiple testers like in codeforces then this problem can be reduced to an extent
I see you used TreeSet. Java’s TreeSet is not as fast as stl:set of C++, which caused you the TLE. Now when you use a language, you should know your tools well. I am also a Java coder and in this problem I wouldn’t use Set, instead I would use other data-structures (like segment tree or fenwick tree) because of the larger constraints. But sadly that would require lot more coding.
I think problem setter and tester could do a better job here. They could lower the constraints (like, sum of N,Q is 10^5 in all test cases). Thus the problem and solution would remain same but those time-limit issues could have been avoided. I hope they will keep this in mind in the future contests.
actually testers for only three languages i.e c++, java and python will cover 99.9999% of people
Couldn’t have said it better.
Also can you tell me how can you implement it using segtree or BIT?
same issue.coke2 doesn’t pass in python
same logic passes in c++.
Timelimits should be customized for c++,java and python and not fixed time multipliers
python-CodeChef: Practical coding for everyone
c+±CodeChef: Practical coding for everyone
try using StringBuffer to accumulate the answers and then print it in one go.
This has helped me many time as I also prefer JAVA.
The same happened with me in this Long Challenge. This was for problem CHEFK1.
okay…if you have done can i contact you after the contest is over?
No need to contact me personally - all solutions will be visible soon after the contest ends, and hopefully the Editorial will be posted soon after that. Lots of people will be posting solutions
do they post editorial for all the problems … because this CodeChef: Practical coding for everyone
problem has no editorial
Perhaps not all, but most. AUG19 eventually had all Editorials posted, though there was a bit of a delay. I posted a whole bunch of solutions for AUG19B with heavily-commented code and an Editorial-style overview for each one, and hopefully I’ll be doing the same this time around
Edit:
Real-life has intervened, and there will be a delay for mine - hopefully all will be posted by end of Monday, GMT
thank you brother…I will be waiting for your solutions
I really like your style of making editorials. I’ve prepared a few myself too. I’ll be posting them when the contest ends. Hope those aren’t too bad.
Yeah. If the editorial isn’t posted immediately after the contest, feel free to contact me. I’d love to be of some help.
Dear brother I have paid for codechef learning camp (3* to 4*) but could not get any link for the classes.
How could i access the course !!
please,help me !!