本文主要是介绍XTU 1233 n个硬币连续m个正面个数(dp),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
题面:
Coins
Problem Description:
Duoxida buys a bottle of MaiDong from a vending machine and the machine give her n coins back. She places them in a line randomly showing head face or tail face on. And Duoxida wants to know how many situations that m continuous coins head face on among all possible situations. Two situations are considered different if and only if there is at least one position that the coins' faces are different.
Input
The first line contains a integer T(no more than 20) which represents the number of test cases.
In each test case, a line contains two integers n and m.()
Output
For each test case, output the result modulo
这篇关于XTU 1233 n个硬币连续m个正面个数(dp)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!