I am stuck on questions "B" and "J" of PSUT Coding Marathon (http://codeforces.com/gym/100687).
My code for "J" ( I believe this is the classroom — lecture greedy problem) : http://pastebin.com/Lnp4VMJL
My code for "B" ( I can only see this as a trivial question, unless I havn't understood the question well enough) : http://pastebin.com/bHL0xcqY
Any hints / cases for any of these questions would be helpful. Thanks!