← All problemsSign in

Chef and Working Plan

CodeChefRating 3287Open on judge ↗

These days, Chef is working on opening a restaurant. Obviously, Chef dislikes running the restaurant by himself. In order to avoid such a terrible thing, he decided to hire exactly $M$ workers (numbered $1$ through $M$) to help him. The workers will choose some positive integer constants $a_1, a_2, \dots, a_M$. A worker with a constant $a$ wants to be paid a fixed salary after each $a$ days. Ch

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