Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Hi fedja, I figured out how to do the original problem, but still don't know about the extension (for $m > 1$). I am still pretty interested in that, if you know how to do it (even just a sketch)