Please read the new rule regarding the restriction on the use of AI tools. ×
Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

pahad_charas_chai's blog

By pahad_charas_chai, history, 4 years ago, In English

problem link : https://atcoder.jp/contests/abc053/tasks/arc068_a

here in the problem it says that two opposite sides have sum = 7

then how for x = 7 only 2 moves are required

  • Vote: I like it
  • -26
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it +4 Vote: I do not like it

Reread the statement.

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

I assume that the first throw (arbitrary) counts, too. So, after two operations there are actually three values to add.

Unfortunatly the statement does not explain how the score is calculated.

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    No, it does not count. What hasn't been said is that out of all arbitrary throws, choose the one which will help you reaching a sum >= x faster(i. e., in less steps)

    For eg, in the sample, we can throw 1(arbitrary throw) then rotate 90 degrees right to bring 5 on the top. Then again rotate the dice to bring 3 on the top. Thus making a sum of 8 (>= 7) inn 2 steps. There are other ways as well.

    Hint : Think Greedily ;)

»
4 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

The key idea of this problem is that we can maximise our score by getting 6,5,6,5... until we've gotten a number that is >=x, so for x=7, the answer is indeed 2.

My Code