Блог пользователя hmehta

Автор hmehta, 3 года назад, По-английски

Topcoder MM 129 - is now live!

Your chickens have escaped from your barn and you need to catch them quickly! Luckily you have some friends who volunteered to help. You are given an NxN grid representing the layout of your farm. Each cell is either empty, a chicken, a wall or a person. Each turn you can move one or more people into an adjacent cell (horizontally or vertically) that is empty or contains a chicken. If the person lands on a chicken then you get (N*N - turnNumber + 1) points and that chicken is collected from the grid. Now the chickens make their moves. These chickens are clever so they will try to move away from the people. Specifically, a chicken will try to move into an empty adjacent cell (horizontally or vertically) that is not adjacent to a person. If there are multiple such cells then one will be selected at random, but if there are no such cells then the chicken will stay where it is. Your task is to score as many points as possible within N*N turns.

Here is an example solution for seed=1:

Problem Setter: dimkadimon
Problem Testers:JacoCronjesullyper,and kphmd

Compete here!

Best of luck!
- the Topcoder Team

  • Проголосовать: нравится
  • +11
  • Проголосовать: не нравится

»
3 года назад, # |
  Проголосовать: нравится +17 Проголосовать: не нравится

This is why you should raise cows and not chickens smh.