Is there a better, less complicated way of tackling this coding problem?

  Kiến thức lập trình

I’m trying to answer this problem:
https://dmoj.ca/problem/ccc22s3

My solution for this problem is to create as many pieces as I can that somehow satisfy N, M, and K all in one go. However, I feel this is too complicated to do as I am not even sure how to go about it. Are there less complicated ways of solving this problem? Don’t give the actual answer. Just hints will do since I’m stuck.

LEAVE A COMMENT