Chef and Rectangle Genome
Chef has an empty matrix of NxM. He wants to construct rectangle genome. For this reason Chef should fill the matrix with letters G, С, A, T. The genome will be stable if it contains K different submatrices. Of course, Chef wants to make his genome as stable as possible, that is the difference between the number of different submatrices in genome and number K should be as small as possible. Plea
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