随笔分类 -  数论

摘要:java大数类的模幂计算中,其中比较核心部分就是使用一种窗口算法来优化乘法,然后使用Montgomery取模乘的办法加速取模。 在jdk中,它的源码如下: private BigInteger oddModPow(BigInteger y, BigInteger z) { /* * The algo 阅读全文
posted @ 2021-07-29 17:56 yosoro 阅读(582) 评论(0) 推荐(0) 编辑
摘要:https://nanti.jisuanke.com/t/41299 指数循环节,快速幂递归求解,需要注意的是快速幂乘的时候如果超过了m需要+m补全循环节 阅读全文
posted @ 2019-09-03 13:57 yosoro 阅读(221) 评论(0) 推荐(0) 编辑
摘要:C. Neko does Maths time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. Neko does Maths tim 阅读全文
posted @ 2019-04-25 13:08 yosoro 阅读(909) 评论(0) 推荐(0) 编辑
摘要:D. The Beatles time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Recently a Golden Circle o 阅读全文
posted @ 2019-04-13 01:50 yosoro 阅读(136) 评论(0) 推荐(0) 编辑
摘要:C. Permutation Cycle time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output For a permutation P 阅读全文
posted @ 2018-04-06 19:28 yosoro 阅读(199) 评论(0) 推荐(0) 编辑
摘要:B. Recursive Queries time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output B. Recursive Querie 阅读全文
posted @ 2018-04-06 17:42 yosoro 阅读(156) 评论(0) 推荐(0) 编辑
摘要:A. Points on the line time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. Points on the li 阅读全文
posted @ 2018-04-06 15:57 yosoro 阅读(216) 评论(0) 推荐(0) 编辑
摘要:C. Sad powers time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. Sad powers time limit p 阅读全文
posted @ 2018-04-06 13:47 yosoro 阅读(265) 评论(1) 推荐(0) 编辑

点击右上角即可分享
微信分享提示