Your point 1 will be invalid if there exists no solution right?
Yes obviously.
I used difference array on maps and solved it in O(n*log(k))
can anyone check my code for q3. i have tried everything
I really like this years question distribution!
Much better than last years
where 1st was a cakewalk and 2ed one was quite difficult and very few people were able to solve it.
am getting yes.
Well, around 2-3k teams solved the 2nd question. It was easy. Infact 3rd question was a bit challenging(a probably a tie breaker).
nice observation !
if any 3 segments having the same velocity have at least a common point(common part is in all 3 segments), then the answer will be a NO else it will be a YES. My team got WA with this idea. Is it wrong? @nik_84 @anon24665730 @vijju123. Any help is appreciated. Thank You.
Has anyone got AC in the question Beautiful Segments(It was probably the 6th question) ?
I havenāt been able to solve it during the contest, but after the contest I have an approach to that problem. It goes something like this :
- Create a prefix array of the original array
- If sum of all elements of the array is not strictly positive, then the answer is NO
- Otherwise, we choose only positive numbers from the prefix array and find if there exists an increasing subsequence of size >= k
Can anyone please verify whether this approach will work or not ?
Its correct
Idea is correct. You must have made error in checking for overlap.
When will the problems be open for practice?
Thanks for the verification. I havenāt even attempted the problem during the contest, just gave it a read. Actually our team got deceived by seeing this question to be the 6th question 
Do u got AC in this prob in the contest???
Yes, I didā¦
You have to take care of one more condition. The increasing subsequence with size >= k should include the last prefix sum, otherwise you may get a wrong answer.
Basically then, is it same as reversing the array and finding LIS starting from index 0?