
----扩展gcd
文章平均质量分 77
_Occult_
物語が始まった
展开
-
HDU 1576 A/B
Description要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。Input数据的第一行是一个T,表示有T组数据。 每组数据有两个数n(0 Output对应每组数据输出(A/B)%9973。Sample Input21原创 2016-08-31 19:46:13 · 289 阅读 · 0 评论 -
POJ 1061 青蛙的约会
Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的。但是除非这两只青蛙在同一时间跳到同一点上,不然是永远都不可能碰面原创 2016-08-31 21:08:21 · 368 阅读 · 0 评论 -
POJ 2115 C Looooops
DescriptionA Compiler Mystery: We are given a C-language style for loop of type for (variable = A; variable != B; variable += C) statement;I.e., a loop which starts by setting variable to原创 2016-08-31 21:18:00 · 345 阅读 · 0 评论 -
HDU 2669 Romantic
DescriptionThe Sky is Sprite. The Birds is Fly in the Sky. The Wind is Wonderful. Blew Throw the Trees Trees are Shaking, Leaves are Falling. Lovers Walk passing, and so are You. .....原创 2016-08-31 21:24:57 · 343 阅读 · 0 评论 -
POJ 2142 The Balance
DescriptionMs. Iyo Kiffa-Australis has a balance and only two kinds of weights to measure a dose of medicine. For example, to measure 200mg of aspirin using 300mg weights and 700mg weights, she ca原创 2016-09-01 21:26:58 · 345 阅读 · 0 评论