Invitation to RECode 15.0

Please add the problems to practice section.

Will there be editorials for these question?

what was the logic for the problem “Speed”, can someone help me?

1 Like

Why?

I got it I missed a pq.empty() condition but the checker should show RE and it showed TLE

find maximum speed for all possible consecutive intervals from 0 to T
ans is sum of length of interval*maximum speed

1 Like

Yes, we will be posting the editorials soon.

1 Like

There can be floating point errors with large values. Although there are functions like sqrtl() for handling that but I prefer to do calculations using integers.

1 Like

Can anyone explain for the first question(EQUAL)
ans for this test case
4
2 4 4 4
shouldn’t it be 2 ?
but the o/p is 4 why ?

1 Like

This is an invalid test case. The readings need to be unique .

1 Like

Please read the problem carefully. It was boldly mentioned the readings are unique. The final value that needs to be equal(equal value), may or may not belong to the array.

2 Likes

Sorry, yes, you are right.

Okay, but someone to inbox me, I wanna ask something