10052 - Inviting Politicians

All about problems in Volume 100. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 10052 - Inviting Politicians

Post by brianfry713 » Fri Apr 27, 2012 2:50 am

I got AC in less than a second by optimizing my recursive backtracking function. I dynamically pick the next politician to assign a color to that has the max number of differently colored neighbors.
Check input and AC output for thousands of problems on uDebug!

Post Reply

Return to “Volume 100 (10000-10099)”