02 2020 档案

摘要:题意:从起点1到另外所有点的距离之和加上,另外所有点到1的距离之和,来去的花费不同。 两次Dijkstra,第二次反方向时,改变始末位置便可套用之前的Dijkstra模板。 1 #include<cstdio> 2 #include<queue> 3 #include<algorithm> 4 #i 阅读全文
posted @ 2020-02-29 22:39 programmer_w 阅读(143) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include<stack> 5 #include<vector> 6 using namespace std; 7 int main() 8 { 9 char str 阅读全文
posted @ 2020-02-28 21:57 programmer_w 阅读(145) 评论(0) 推荐(0)
摘要:1 #include<cstdio> 2 #include<vector> 3 #include<algorithm> 4 #include<iostream> 5 #include<cstring> 6 using namespace std; 7 typedef long long LL; 8 阅读全文
posted @ 2020-02-21 13:42 programmer_w 阅读(1) 评论(0) 推荐(0)
摘要:A - 敌兵布阵 HDU - 1166 1 #include <iostream> 2 #include <map> 3 #include <string> 4 #include<algorithm> 5 #include<vector> 6 #include<cmath> 7 #include<q 阅读全文
posted @ 2020-02-19 17:00 programmer_w 阅读(0) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/wifePI/p/12269094.html 阅读全文
posted @ 2020-02-19 16:53 programmer_w 阅读(1) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/zhang-Kelly/p/12283942.html 阅读全文
posted @ 2020-02-19 16:51 programmer_w 阅读(0) 评论(0) 推荐(0)
摘要:A - 畅通工程续 HDU - 1874 spfa 1 #include <iostream> 2 #include <map> 3 #include <string> 4 #include<algorithm> 5 #include<vector> 6 #include<cmath> 7 #inc 阅读全文
posted @ 2020-02-19 16:34 programmer_w 阅读(2) 评论(0) 推荐(0)
摘要:B - Element Swapping ZOJ - 4101 https://blog.csdn.net/qq_41700151/article/details/89646207 E - Sequence in the Pocket ZOJ - 4104 题意:t 组数据,每组给出 n 个数,每次 阅读全文
posted @ 2020-02-15 22:43 programmer_w 阅读(1) 评论(0) 推荐(0)
摘要:A - Peak ZOJ - 4024 题目大意:判断数列是否是先递增后递减数列 从两端分别以递增和递减判断 看第一个不满足递增或递减的数是否相等并且没越界就可以了 1 #include<cstdio> 2 #include<iostream> 3 #include<cstring> 4 #incl 阅读全文
posted @ 2020-02-14 22:26 programmer_w 阅读(2) 评论(0) 推荐(0)
摘要:A - Bone Collector HDU - 2602 背包水题 1 #include<iostream> 2 #include<algorithm> 3 using namespace std; 4 int main() 5 { 6 int t,n,v; 7 scanf("%d", &t); 阅读全文
posted @ 2020-02-08 13:51 programmer_w 阅读(1) 评论(0) 推荐(0)
摘要:A - Red and Black HDU - 1312 dfs 题目大意:给你起点,障碍物不可越过,最多能去到几个点。 1 #include <iostream> 2 #include <map> 3 #include<cstdio> 4 using namespace std; 5 int sx 阅读全文
posted @ 2020-02-08 10:53 programmer_w 阅读(2) 评论(0) 推荐(0)
摘要:A - Cable master HDU - 1551 题目大意:求最大长度,使得每段铁丝截得的段数等于给出的k值。 1 #include<algorithm> 2 #include <iostream> 3 #include<cstdio> 4 #include<cmath> 5 #include 阅读全文
posted @ 2020-02-08 10:13 programmer_w 阅读(0) 评论(0) 推荐(0)
摘要:A - Let the Balloon Rise HDU - 1004 迭代器遍历 题目大意:给一些气球颜色输出数量最多的气球颜色。 1 #include<iostream> 2 #include<cstdio> 3 #include<vector> 4 #include<map> 5 using 阅读全文
posted @ 2020-02-08 10:00 programmer_w 阅读(1) 评论(0) 推荐(0)
摘要:题意:在一个有根树上每个节点有一个权值,每相邻的父亲和孩子只能选择一个,问怎么选择总权值之和最大。 #include<cstdio> #include<vector> #include<stack> #include<set> #include<algorithm> using namespace 阅读全文
posted @ 2020-02-07 21:38 programmer_w 阅读(0) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/wifePI/p/12269094.html 阅读全文
posted @ 2020-02-06 22:50 programmer_w 阅读(0) 评论(0) 推荐(0)
摘要:#include<iostream> #include<algorithm> #include<cstdio> #include<iomanip> #define inf 0x3f3f3f3f const int maxn = 1e5 + 10; using namespace std; int f 阅读全文
posted @ 2020-02-05 14:00 programmer_w 阅读(1) 评论(0) 推荐(0)
摘要:NIKE和苹果店要在一起,所以将他们两个放在第一步联结确保相连。 #include<iostream> #include<algorithm> #include<cstdio> #include<iomanip> #include<cmath> #define inf 0x3f3f3f3f cons 阅读全文
posted @ 2020-02-05 13:54 programmer_w 阅读(1) 评论(0) 推荐(0)
摘要:#include<iostream> #include<algorithm> #include<cstdio> #include<cmath> using namespace std; const int MAXN = 1e4 + 10;//拿来开存边的数量的结构体 题目N<100 所以最多开到N* 阅读全文
posted @ 2020-02-05 13:52 programmer_w 阅读(8) 评论(0) 推荐(0)