1≤K≤N : what does this constraint mean?

"Social distancing guidelines require that every diner be seated such that K seats to their left and K seats to their right (or all the remaining seats to that side if there are fewer than K) remain empty." There is no "between" in this sentence. For the first and the last diner you have to check the seats to the left of the first diner and the seats to the right of the last diner. For all the other diners you could say "between" the one on the left and the one on the right.

If all the constraints are checked before the calculation starts then there shouldn't be a test for M == 0 because the constraint is 1≤M≤500,000
If this puzzle test was given during a job interview then you would probably get only a couple of hours to solve the puzzle!
The purpose of such a test is to see how the applicant behaves under a stress situation and how much of the solution he or she could find.
Hopefully there will be no more social distancing...