Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

Petr's blog

By Petr, history, 9 years ago, In English
  • Vote: I like it
  • +58
  • Vote: I do not like it

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

scales: as Enchom mentioned, making a backtrack over the decision tree was probably the best idea (the difference between 36 and 6! seems too small for anything manual). 7 moves are doable quite well manually, sorting 4 numbers in 3 moves (min,nextmin,max) first and inserting the remaining two numbers in 2 moves each (if we have sorted 1,2,3,4,5, then median(2,4,6) leaves just 2 choices).

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

What about Google Code Jam?