摘要: 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 阅读(0) 评论(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 阅读(7) 评论(0) 推荐(0)
摘要: 判断折线往什么方向拐: <1>点为(x1,y1),(x2,y2),(x3,y3) <2>s = (x1-x3)*(y2-y3) - (y1-y3)*(x2-x3) (PS:记忆方法。。。。xyyx和1323 1323) <3>s > 0时,逆时针拐; s < 0时,顺时针拐。 #include <c 阅读全文
posted @ 2020-01-30 22:52 programmer_w 阅读(1) 评论(0) 推荐(0)