上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 56 下一页
摘要: hdu6277结论题 阅读全文
posted @ 2019-07-21 22:50 WeiAR 阅读(157) 评论(0) 推荐(0) 编辑
摘要: poj3463大意:统计最小的长度个数+统计最小的长度+1的个数,大概就是求最短路和次短路的条数更新的时候有5种情况,有个细节就是它得是二维的,一个表示节点编号,一个0/1表示它是次短路的还是最短路的,把结构体扔到队列里。需要更新的就是4种情况。w<最小值w=最小值w<次小值w=次小值 阅读全文
posted @ 2019-07-21 22:42 WeiAR 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Gym - 100543Lhttps://vjudge.net/problem/153854/origin区间dp,要从区间长度为1开始dp 阅读全文
posted @ 2019-07-20 20:05 WeiAR 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Gym - 102021Ehttps://vjudge.net/problem/2109787/origin主要是一个处理精度的技巧,避免精度误差可以加eps,然后乘1e(小数点之后的位数)。 阅读全文
posted @ 2019-07-20 15:07 WeiAR 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Gym 100712Hhttps://vjudge.net/problem/195715/origin先缩点,再建立新图,然后跑两遍dfs求树上最长路 #include<iostream> #include<cstdio> #include<queue> #include<algorithm> #i 阅读全文
posted @ 2019-07-20 13:28 WeiAR 阅读(236) 评论(0) 推荐(0) 编辑
摘要: CodeForces - 752Bhttps://vjudge.net/problem/597648/origin简单模拟,主要是细节特殊情况多考虑一下,看代码就行 阅读全文
posted @ 2019-07-19 19:52 WeiAR 阅读(163) 评论(0) 推荐(0) 编辑
摘要: CodeForces - 1087Dhttps://vjudge.net/problem/2115151/origin2*和/叶子结点的个数 阅读全文
posted @ 2019-07-19 19:22 WeiAR 阅读(137) 评论(0) 推荐(0) 编辑
摘要: AtCoder - 3959https://vjudge.net/problem/1583855/origin求最长连续递增长度就行,答案是n-max(len) 阅读全文
posted @ 2019-07-19 19:13 WeiAR 阅读(80) 评论(0) 推荐(0) 编辑
摘要: poj2135根本想不到系列求1到n,和n到1的最短路,但是不能重复走。超级源点连到1,流量为2,费用为0;n连到超级汇点,流量为2,费用为0。其他的流量为1,费用为边的长度。(图中为双向边 阅读全文
posted @ 2019-07-19 10:17 WeiAR 阅读(196) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include #include #include #define inf 2147483647 #define ls rtq; void in(int &x){ int y=1; char c=g();x=0; while(c'9'){ ... 阅读全文
posted @ 2019-07-18 20:59 WeiAR 阅读(115) 评论(0) 推荐(0) 编辑
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 56 下一页