
组合数学
Eira_H
这个作者很懒,什么都没留下…
展开
-
BZOJ 1008:越狱
Describtion 监狱有连续编号为1…N的N个房间,每个房间关押一个犯人,有M种宗教,每个犯人可能信仰其中一种。如果相邻房间的犯人的宗教相同,就可能发生越狱,求有多少种状态可能发生越狱 Input 输入两个整数M,N.1<=M<=10^8,1<=N<=10^12 Output 可能越狱的状态数,模100003取余 Sample Input 2 3 Sample原创 2017-08-18 17:39:55 · 620 阅读 · 0 评论 -
HDU 3037:卢卡斯定理
Description Although winter is far away, squirrels have to work day and night to save beans. They need plenty of food to get through those long cold days. After some time the squirrel family thinks th原创 2017-08-19 21:24:45 · 370 阅读 · 0 评论