Chef and the Test
CodeChefOpen on judge ↗
Chef is going to give a test with total marks M. The test has N questions: Q1, Q2 …. Qn. Question $Qi$ has marks $Mi$ Chef has 2 properties:- 1. He can solve only a limited number of questions as he is underprepared. The questions that he can solve and cannot solve are determined by a mask P. If pi is 1 then the chef can solve the question. If pi is 0, he cannot solve the question (refer examp
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