Two Flowers
Chef Go has planted a flower field — a grid with $n$ rows and $m$ columns. In each cell of this grid, a single flower is planted; let's denote the type of the flower planted in cell $(i, j)$ by $a_{i,j}$. Today, Chef Go is going to make a new menu with two dishes: *Tom Yum Goong* and *Tom Kha Kai*. He needs to pick as many flowers as possible to decorate the dishes and make them look attractive.
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