ICPC 2019 online round discussion

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))

1 Like

can anyone check my code for q3. i have tried everything

I really like this years question distribution!
Much better than last years :stuck_out_tongue: 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.

1 Like

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 :

  1. Create a prefix array of the original array
  2. If sum of all elements of the array is not strictly positive, then the answer is NO
  3. 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 ?

1 Like

Its correct

1 Like

Idea is correct. You must have made error in checking for overlap.

1 Like

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 :sweat_smile:

He did not verify your idea. He replied to @Jyotisona_123

Do u got AC in this prob in the contest???

Yes, I did…

1 Like

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.

@jyotisona_123
We got the same issue.

Basically then, is it same as reversing the array and finding LIS starting from index 0?