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
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
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
Name |
---|
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