HDU5171 GTYs birthday gift(矩阵快速幂)

FFZ’s birthday is coming. GTY wants to give a gift to ZZF. He asked his gay friends what he should give to ZZF. One of them said, ‘Nothing is more interesting than a number multiset.’ So GTY decided to make a multiset for ZZF. Multiset can contain elements with same values. Because GTY wants to finish the gift as soon as possible, he will use JURUO magic. It allows him to choose two numbers a and b(

), and add

to the multiset. GTY can use the magic for k times, and he wants the sum of the multiset is maximum, because the larger the sum is, the happier FFZ will be. You need to help him calculate the maximum sum of the multiset.

,仿佛一支飘荡在水上的华丽咏叹调。

HDU5171 GTYs birthday gift(矩阵快速幂)

相关文章:

你感兴趣的文章:

标签云: