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

Автор broadway, история, 4 года назад, По-английски

You are playing the game "Blasting The Sheep". The goal of the game is to blast off all sheep in the current level. The level in the game is described by a string of length n, consisting of the characters '.' (empty space) and '*' (sheep).

In one move, you can perform one of the following actions:
- Move any sheep one square to the left or one square to the right, if the corresponding square exists and is empty. This will take A units of time.
- Use the Blasters over a continuous substring consisting only those cells that currently harbor a sheep. This will take B units of time.

The game ends as soon as there no sheep on the level.
For example, if n=6 and the level is described by the string "**.*..", then the following game scenario is possible:

- The sheep at position 4 moves to the right, the state of the level: "**..*."
- The sheep at position 2 moves to the right, the state of the level: "*.*.*."
- The sheep at position 1 moves to the right, the state of the level: ".**.*."
- Use Blasters over the substring s[2:3], the state of the level: "....*."
- Use Blasters over the substring s[5:5], the state of the level: "......"
- the sheep are blasted away into oblivion and the game ends.


For a given level, determine the minimum time in which you can complete the level.

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

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

What do you want to know?

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится

    For a given level, determine the minimum time in which you can complete the level.

    You don't like to read?

»
4 года назад, # |
  Проголосовать: нравится -22 Проголосовать: не нравится

tera naam broadway nhi badwe rakhna chaiye tha

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Why are you making derogatory comments about an absolute stranger on codeforces? I expected better from a person with your rating and dedication towards CP. And a sincere token of gratitude for the rest of the CF community for upvoting such a nonsense comment.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +6 Проголосовать: не нравится

    People like you give the Internet a bad reputation. I hope you feel good about yourself after making worthless comments.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится

    Toh uss hisab se toh tera naam, ChamanC*****a :) He asked solution/help for a problem. At-least read once, before saying anything in a community. People like you are responsible for the bad reputation of our country, to be honest. If you want to help, help him, else just leave, no need for derogatory comments.

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

I dont understand why people are so ignorant,He has asked different problem but still downvotes!!!