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
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
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
Название |
---|
Reread the statement.
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.
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 ;)
Then, how is 7 possible with two operations?
Operations start counting after the arbitrary throw.
Ah ok, at least x. Not simply x.
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