会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
WeiAR
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
20
21
22
23
24
25
26
27
28
···
56
下一页
2019年8月2日
UVA - 374
摘要: https://vjudge.net/problem/19685/origin 费马小定理优化快速幂 因为加了费马小定理优化,小心2 2 2这种情况,会出现0 0 2,也就是0的0次方,实际答案为0
阅读全文
posted @ 2019-08-02 00:15 WeiAR
阅读(104)
评论(0)
推荐(0)
2019年8月1日
UVA - 1230
摘要: https://vjudge.net/problem/UVA-1230 费马小定理优化快速幂
阅读全文
posted @ 2019-08-01 22:47 WeiAR
阅读(121)
评论(0)
推荐(0)
快速幂小优化
摘要:
阅读全文
posted @ 2019-08-01 17:25 WeiAR
阅读(138)
评论(0)
推荐(0)
P1249 最大乘积
摘要: 打暴力找规律,都是连续自然数去掉一个
阅读全文
posted @ 2019-08-01 16:52 WeiAR
阅读(287)
评论(0)
推荐(0)
P1009阶乘之和
摘要: n=int(input()) ans=0 for i in range(1,n+1): t=1 for j in range(1,i+1): t*=j; ans+=t; print(ans)
阅读全文
posted @ 2019-08-01 11:40 WeiAR
阅读(162)
评论(0)
推荐(0)
P1080(python 高精度)
摘要: https://www.luogu.org/problem/P1080
阅读全文
posted @ 2019-08-01 11:25 WeiAR
阅读(618)
评论(0)
推荐(0)
2019年7月31日
Gym100889L
摘要: Gym100889Lhttps://vjudge.net/problem/341988/origin题目大意:有一个n*n的图,m条双向边(没有重边自环),求从每个节点出发走k条路后到其他所有节点的最短距离和方案数,方案数取模1e9+7输出做法:传递闭包,走k条路,就是做k次矩阵乘法,所谓矩阵乘法就
阅读全文
posted @ 2019-07-31 23:13 WeiAR
阅读(161)
评论(0)
推荐(0)
poj3233
摘要: (g++比c++快不少 分治+矩阵快速幂
阅读全文
posted @ 2019-07-31 17:27 WeiAR
阅读(117)
评论(0)
推荐(0)
upper_bound
摘要: upper_bound1.temp=upper_bound(a+1,a+n+1,x)-b;temp表示在数组a中第一个大于x的位置 2.bool cmp(int a,int b){ return a>b;}temp=upper_bound(a+1,a+n+1,x,cmp)-b;temp表示在数组a中
阅读全文
posted @ 2019-07-31 16:09 WeiAR
阅读(119)
评论(0)
推荐(0)
lower_bound
摘要: lower_bound1.temp=lower_bound(a+1,a+n+1,x)-b;temp表示在数组a中第一个大于等于x的位置 2.bool cmp(int a,int b){ return a>b;}temp=lower_bound(a+1,a+n+1,x,cmp)-b;temp表示在数组
阅读全文
posted @ 2019-07-31 16:06 WeiAR
阅读(171)
评论(0)
推荐(0)
上一页
1
···
20
21
22
23
24
25
26
27
28
···
56
下一页
公告