数论
without_Zzz
人生很贵,请别浪费
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Comet OJ - Contest #4(数论+推公式)
PS:做这道题的时候开始公式推错了,就一直wrong,哎,还是太菜了。 题解: #include <cstdio> using int64 = long long; int main() { int T; scanf("%d", &T); for (int cas = 1; cas <= T; ++cas) { int64 l, r, k; ...原创 2019-05-26 10:38:13 · 402 阅读 · 0 评论 -
CF——399div2.B.Red and Blue Balls
B. Red and Blue Balls time limit per test0.5 seconds memory limit per test256 megabytes inputstandard input outputstandard output User ainta has a stack of n red and blue balls. He can apply a certain...原创 2019-05-31 12:14:40 · 457 阅读 · 0 评论 -
CDUTCM——1216任大佬的数学难题
PS:这道题卡了很久,到最后都没有AC,题意很清楚明了,认真分析一下就可以发现就是一个公式C(k,m)a的(k-m)次方乘以b的m次方,但由于k,n,m都很大,所以求C(k,m)时不能用常规的取模运算,具体为什么点这里,大佬讲的很详细,除法不能取模,所以就要用乘法逆元,具体我也不是很懂,记住要这样用就对了 AC代码: #include<bits/stdc++.h> using nam...原创 2019-09-23 19:25:55 · 480 阅读 · 1 评论
分享