← All problemsSign in

Alternate Universe

CodeChefRating 2355Open on judge ↗

Codechef has been founded in an alternate universe, and here the rating system works weirdly. There are $N$ rated contests, and you will be taking part in them. In the $i$-th contest, if your rating $R$ is at most $A_i$, you can choose to get an increase in your rating in the range $[0, B_i]$, i.e. you may choose to increase your rating by any integer $X$ satisfying $0 \le X \le B_i$. Further,

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start