Company: Samsung_29july
Difficulty: medium
Maximize Amplifier Factor Problem Description A signal amplifier is built as a grid of semiconductor elements with N rows and M columns, N x M elements in total. Every element is in one of two states: 'Positive' or 'Negative'. A signal travels through the amplifier from left to right along a row. A row carries its signal all the way across only when every element in that row is 'Positive'. Signals never move up or down, so each row succeeds or fails on its own. The amplification factor is the number of rows whose elements are all 'Positive'. A special laser can flip the state of a whole column: every element in the chosen column changes from 'Positive' to 'Negative' and from 'Negative' to 'Positive'. The laser is fired at one column at a time, it may be aimed at a column that has already been used, and it may only be aimed at a column of the amplifier. The equipment fires the laser a fixed number of times: it must be used exactly K times , no more and no fewer. The count cannot be redu