Please subscribe to the official Codeforces channel in Telegram via the link ×

Problem : Constructing Tests

Revision en1, by my_tempo, 2021-03-24 07:14:50

Problem Link
I think it would be optimal to fill zeros starting from (m,m) and then at a gap of 2*m-2 in each row(because we will cover that much squares of size m*m).
So the minimum zeros required would be around n/(2*m-1)
Same will happen for columns, So the answer should be somewhere around (n/(2*m-1))^2 after just taking care of n%(2m-1) remaining cells.
But on the editorial, It is saying that minimum number of zeros should be (n/m)^2, Can someone tell where am I going wrong?

Tags #doubt, #logic, #editorial, #combinations


  Rev. Lang. By When Δ Comment
en1 English my_tempo 2021-03-24 07:14:50 584 Initial revision (published)