摘要: #include #include #include #include #include#include#include#i... 阅读全文
posted @ 2019-07-05 15:29 最爱丁珰 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 地杰斯特拉算法步骤: 1.找离起点x最近的未讨论过的点k 2.判断经过k点,起点x到其他点的距离是否缩短,如缩短则更新。将k点标记为... 阅读全文
posted @ 2019-07-05 15:29 最爱丁珰 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 输入n,输入b【i】,w【i】(1#define ll long longusing namespace std; int main... 阅读全文
posted @ 2019-07-05 15:29 最爱丁珰 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 给定n,m,p,求C(n,m)%p的值 方法一:递推 #include#define ll long longusing names... 阅读全文
posted @ 2019-07-05 15:28 最爱丁珰 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 输入多组数据,每组数据有n个正整数,判断有多少个质数 #include#define ll long longusing names... 阅读全文
posted @ 2019-07-05 15:28 最爱丁珰 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 输入n,求φ(1),φ(2)…φ(n) #includeusing namespace std;int n;long long ph... 阅读全文
posted @ 2019-07-05 15:28 最爱丁珰 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 输入a,b,求ax+by=gcd(a,b)中的一组整数解 #includeusing namespace std;int a,b,x... 阅读全文
posted @ 2019-07-05 15:28 最爱丁珰 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 问题描述 时间:三国时期 ;地点:许昌;人物:曹操,你。 事件: 起因:曹操得知许昌城里有n个袁绍的奸细。(他们编号为1到n,奸细间... 阅读全文
posted @ 2019-07-05 15:28 最爱丁珰 阅读(27) 评论(0) 推荐(0) 编辑
摘要: floyd求最短路 #include#include#include#include#include#includeusing na... 阅读全文
posted @ 2019-07-05 15:28 最爱丁珰 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 题目描述 lyd学会了使用扑克DIY占卜。方法如下:一副去掉大小王的扑克共52张,打乱后均分为13堆,编号1~13,每堆4张,其中第... 阅读全文
posted @ 2018-10-21 14:21 最爱丁珰 阅读(41) 评论(0) 推荐(0) 编辑