数论
bfcx
这个作者很懒,什么都没留下…
展开
-
【POJ - 2917】Diophantus of Alexandria(推公式)
Diophantus of Alexandria was an Egypt mathematician living in Alexandria. He was one of the first mathematicians to study equations where variables were restricted to integral values. In honor of him,...原创 2019-03-24 20:27:20 · 267 阅读 · 1 评论 -
扩展欧几里得2(详解)
此篇文章转自:https://blog.csdn.net/codeswarrior/article/details/78228835一开始学习扩展欧几里得发现学习了模板代码后,仍然不会做题,很多题要求的没有那么简单,而且涉及到了很多之前不知道的知识,因此首先先要补充一下可能会用到的知识:1、二元一次不定方程的一般形式为ax+by=c。其中 a,b,c 是整数,ab ≠ 0。此方程有整数解的...转载 2019-03-27 14:35:40 · 367 阅读 · 0 评论 -
【SPOJ - MOD】Power Modulo Inverted(扩展BSGS)
Given 3 positive integersx,yandz, you can findk = xy%zeasily, by fast power-modulo algorithm. Now your task is the inverse of this algorithm. Given 3 positive integersx,zandk, find the small...原创 2019-04-05 19:46:33 · 348 阅读 · 2 评论 -
【CodeForces - 1114C】Trailing Loves (or L'oeufs?) (数论)
The number "zero" is called "love" (or "l'oeuf" to be precise, literally means "egg" in French), for example when denoting the zero score in a game of tennis.Aki is fond of numbers, especially those...原创 2019-06-04 19:38:36 · 295 阅读 · 0 评论