Lazy Shikamaru
CodeChefOpen on judge ↗
Its Chozi's birthday and Shikamaru decided to buy a cake for him. Shikamaru is so lazy that he will buy a cake from a shop which will take the least time to reach from his house. There are $N$ cake shops numbered $1$ to $N$. The price of cake at shop $i$ is $P_i$ and the time needed to reach that shop is $T_i$.(Time is in minutes) In case there are more than $1$ shops which take the least ti
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.
Sign in to chat with the tutor and save your progress.
Sign in to start