Company: Samsung_29july
Difficulty: medium
Maximize Amplifier Factor Problem Description Samsung Electronics has developed a signal amplifier with high efficiency by using semiconductor elements. The amplifier consists of N vertical elements, M horizontal elements, in total N x M elements. Each element will send a signal from left to right, if its status is 'Positive', but not if it's 'Negative'. This means that only if all elements in one row are 'Positive', the amplification factor will increase by one. (Signals cannot be transmitted up or down direction.) By making the degree of integration very high and the energy consumption low, it is difficult, in return, to make all elements 'Positive' due to process limitations. Signals are transmitted from left to right; The more rows there are with only 'Positive' elements, the higher increases the amplification factor. For instance in [Fig. 1-1] below, since the elements are all 'Positive' in one row, the amplification factor is 1. However, since two rows in [Fig. 1-2] are full of '