Hi everyone! The countdown is on. Round 1B begins in under 24 hours. If you preferred to sleep instead of competing in round 1A (just like me!), then this round is for you! The top 1000 contestants from sub-round will advance to Online Round 2 and won't be able to compete in further sub-rounds.
I remind you that round will take place on Saturday, May 3 at 16:00 UTC at the site, that everybody knows.
Напоминаю, что до начала осталось всего 4 минуты.
===============================
Just a reminder. It is less than 4 minutes before the start of contest.
How was the large input of Problem B supposed to be solved?
Dynamic dp[32][2][2][2] first parameter — bit number second: 1 if current mask for A equal to A, 0 if less. Same for B and K
Thanks!
There are many ways to do that. This code surprisingly works, but is awful: http://ideone.com/KOxA9q
Here is a very similar problem (XOR instead of AND) from topcoder SRM 595 div2 1000 problem : http://community.topcoder.com/stat?c=problem_statement&pm=12623&rd=15707&rm=319170&cr=23091955
You can take a look at the editorial : http://apps.topcoder.com/wiki/display/tc/SRM+595
How to solve the last problem? I couldn't even solve the small input!
Greedily take the vertex with the least zip code among those which don't cause disconnecting the graph.
Got it, thank you :)