← All problemsSign in

SnackUp

CodeChefRating 1628Open on judge ↗

This year CodeChef is organizing the SnackUp cooking contest. The favorite to win is of course our beautiful Chef Ada. There are n judges in the contest, and for simplicity let's enumerate judges from 1 to n. Ada has an uncountable repertoire of delicious recipes, but for the contest she choose only n of them. Let's also enumerate the recipes from 1 to n. Ada is going to show off her cooking sk

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