Paint House
CodeChefOpen on judge ↗
There is $n$ house in village where you living. each house has some color $c_i$ $(1 \le c_i \le n)$. You have $n$ Color. You want to paint all house in same color(you can paint all houses in any color you want ). In one day you can repaint any house in any of the $n$ color. You have infinite amount of color of all type. Print minimum days it take to paint all house in same color. Yo
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