http://acmicpc-live-archive.uva.es/nuev ... php?p=3377
I found that the problem statement contradicting:
And the judge's input contain overlapping rooms!!! I've solved the problem by not counting the shared blocks between overlapping rooms. I'm pretty sure that the judge's input should not contain any overlapping rooms, but I might be wrong... If you've solved this problem, I would love to hear what did you think when solving this problem.No two rooms will overlap, though they may share a side.