CHEFWM - Editorial

Exactly, this is what I am having a doubt.
I guess you wanted to say “si” instead of “ci”.

Adding to your point, take the case when N=4, M=20
Ouput should be 1, but the solutions mentioned in the editorial is 2, which is wrong according to problem statement.

Please clear this doubt, @pranavreddyp16 @lavish315 @tejas10p @ajit123q

I guess you are again confusing ci with si. Considering prime factors of 20 i.e 2 and 5 will give ci values. So, let ci = 2 and cj = 5 (number of windows in a column) then si = 10 and sj = 4 (sizes of every window in a column). Using these sizes we can see that they will never meet at a horizontal level. (SEE THE IMAGE ATTACHED).

3 Likes

You haven’t understood the question properly. Try reading the question again.

Thank you so much for clarifying, @anish_op !

1 Like

:smiley:Welcome!

2 Likes