Dishes For All (Keteki)
CodeChefOpen on judge ↗
There are A[0] dishes of type 1, A[1] dishes of type 2... A[N-1] dishes of type N-1, a total of N types of dishes. The dishes would be represented by an array A. What is the maximum number of people that can eat the dishes if each person must get at least one dish of each type, no dish from any type can be wasted, and all persons have the exact same number of dishes of each type. Print this maxim
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