
逆元
Cherry_0525
这个作者很懒,什么都没留下…
展开
-
【大组合数取模 Lucas定理 模板】HDU - 3037 A - Saving Beans
A - Saving Beans HDU - 3037 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 squirre...原创 2018-10-07 13:23:46 · 174 阅读 · 0 评论 -
【组合数学 逆元打表】 HDU - 5698 F - 瞬间移动
F - 瞬间移动 HDU - 5698 有一个无限大的矩形,初始时你在左上角(即第一行第一列),每次你都可以选择一个右下方格子,并瞬移过去(如从下图中的红色格子能直接瞬移到蓝色格子),求到第nn行第mm列的格子有几种方案,答案对10000000071000000007取模。 Input 多组测试数据。 两个整数n,m(2≤n,m≤100000)n,m(2≤n,m≤100000)...原创 2018-10-07 18:39:30 · 170 阅读 · 0 评论 -
【组合数取模 不用Lucas】 HYSBZ - 3260 I - 跳
I - 跳 HYSBZ - 3260 邪教喜欢在各种各样空间内跳。现在,邪教来到了一个二维平面。 在这个平面内,如果邪教当前跳到了(x,y),那么他下一步可以选择跳到以下4个点: (x-1,y),(x+1,y),(x,y-1),(x,y+1)。 而每当邪教到达一个点,他需要耗费一些体力, 假设到达(x,y)需要耗费的体力用C(x,y)表示。 对于C(x,y),有以下几个性质: 1...原创 2018-10-08 19:35:46 · 253 阅读 · 0 评论 -
【威尔逊定理+快速乘】hdu2019多校第三场 6608 Fansblog
http://acm.hdu.edu.cn/showproblem.php?pid=6608 Problem Description Farmer John keeps a website called ‘FansBlog’ .Everyday , there are many people visited this blog.One day, he find the visits has r...原创 2019-07-31 11:12:06 · 168 阅读 · 0 评论