Delicious Queries
Chef has prepared a menu for his new restaurant. The menu consists of $N$ dishes whose flavour is given by $M_1, M_2, \dots, M_N$, where $M_i$ denotes the flavour of the $i^{th}$ dish. Chef has some rules in his restaurant- - A dish is served only if the customer has already eaten all the dishes preceding it on the menu. - Each dish will only be served once. Aman, the richest man in the area, s
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