Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

Pathetic_loser's blog

By Pathetic_loser, 9 years ago, In English

Problem

Some help/hint would be greatly appreciated :)

  • Vote: I like it
  • +13
  • Vote: I do not like it

»
9 years ago, # |
  Vote: I like it +9 Vote: I do not like it

There are at most 11 prime numbers less than sqrt(N). Try all possible assignments of these switches (211 ways). Each lamp is now attached to at most 1 unassigned switch (those are greater than sqrt(N)) and we can solve it by greedy approach (count the number of on/off lamps for each switch).