
----乘法逆元
文章平均质量分 66
_Occult_
物語が始まった
展开
-
HDU 5226 Tom and matrix
Problem DescriptionTom was on the way home from school. He saw a matrix in the sky. He found that if we numbered rows and columns of the matrix from 0, then,ai,j=Cjiif i ai,j=0Tom sudden原创 2015-05-09 22:25:54 · 775 阅读 · 0 评论 -
HDU 3074 Multiply game
Problem DescriptionTired of playing computer games, alpc23 is planning to play a game on numbers. Because plus and subtraction is too easy for this gay, he wants to do some multiplication in a num原创 2015-02-25 20:37:40 · 756 阅读 · 0 评论 -
HDU 3240 Counting Binary Trees
Problem DescriptionThere are 5 distinct binary trees of 3 nodes:Let T(n) be the number of distinct non-empty binary trees of no more than n nodes, your task is to calculate T(n) mod m.In原创 2015-05-13 23:48:24 · 619 阅读 · 0 评论 -
HDU 5525 Product
Problem DescriptionGiven a number sequence A1,A2....An,indicating N=∏ni=1iAi.What is the product of all the divisors of N? InputThere are multiple test cases.First line of each c原创 2015-11-01 00:08:47 · 664 阅读 · 0 评论 -
ZOJ 3609 Modular Inverse
DescriptionThe modular modular multiplicative inverse of an integer a modulo m is an integer x such that a-1≡x (mod m). This is equivalent toax≡1 (mod m).InputThere are multiple test原创 2016-04-19 22:14:54 · 457 阅读 · 0 评论 -
HDU 5685 Problem A
Problem Description度熊手上有一本字典存储了大量的单词,有一次,他把所有单词组成了一个很长很长的字符串。现在麻烦来了,他忘记了原来的字符串都是什么,神奇的是他竟然记得原来那些字符串的哈希值。一个字符串的哈希值,由以下公式计算得到:H(s)=∏i≤len(s)i=1(Si−28) (mod 9973)Si代表 S[i] 字符的 ASCII 码。请原创 2016-05-16 13:37:41 · 761 阅读 · 0 评论 -
HDU 5698 瞬间移动
Problem Description有一个无限大的矩形,初始时你在左上角(即第一行第一列),每次你都可以选择一个右下方格子,并瞬移过去(如从下图中的红色格子能直接瞬移到蓝色格子),求到第n行第m列的格子有几种方案,答案对1000000007取模。![http://acm.hdu.edu.cn/data/images/C702-1003-1.jpg](http://acm.hdu.原创 2016-05-22 22:47:41 · 711 阅读 · 0 评论 -
HDU 4196 Remoteland
DescriptionIn the Republic of Remoteland, the people celebrate their independence day every year. However, as it was a long long time ago, nobody can remember when it was exactly. The only thing p原创 2016-11-09 11:01:27 · 338 阅读 · 0 评论