上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 56 下一页
摘要: A水,总是忘记输出个数 #include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<vector> #include<cstdio> #include<cassert> #include<i 阅读全文
posted @ 2017-07-31 19:07 walfy 阅读(109) 评论(0) 推荐(0)
摘要: A,判断向哪边旋转的,枚举过的= =,感觉我的太复杂了,应该有更简单的方法 #include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<vector> #include<cstdio> #i 阅读全文
posted @ 2017-07-31 11:48 walfy 阅读(135) 评论(0) 推荐(0)
摘要: C题,刚开始以为遍历整个树,后来发现二重循环判断就行了 #include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<vector> #include<cstdio> #include<cas 阅读全文
posted @ 2017-07-30 11:00 walfy 阅读(222) 评论(0) 推荐(0)
摘要: 这一场有点坑 A题,求最大值之后相减 #include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<vector> #include<cstdio> #include<cassert> #in 阅读全文
posted @ 2017-07-28 20:04 walfy 阅读(136) 评论(0) 推荐(0)
摘要: 求距离 #include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<vector> #include<cstdio> #include<cassert> #include<iomanip> 阅读全文
posted @ 2017-07-28 14:05 walfy 阅读(482) 评论(0) 推荐(0)
摘要: CodeForces 402A 水题,模拟 #include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<vector> #include<cstdio> #include<cassert> 阅读全文
posted @ 2017-07-28 12:43 walfy 阅读(157) 评论(0) 推荐(0)
摘要: 求三点之间的最短路,,分别求两点之间的lca除2即可(代码写的太挫了,wa了14发= =) #include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<vector> #include<cs 阅读全文
posted @ 2017-07-28 12:38 walfy 阅读(154) 评论(0) 推荐(0)
摘要: lca求距离,带权值 的树上求lca,我是用倍增法求的,求两点之间的距离转化为到根节点之间的距离 (de了一个小时 的bug,重打居然就过了。。。。) #include<map> #include<set> #include<cmath> #include<queue> #include<stack 阅读全文
posted @ 2017-07-27 19:40 walfy 阅读(349) 评论(0) 推荐(0)
摘要: 直接套模板,dfs的时候注意起点 #include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<vector> #include<cstdio> #include<cassert> #incl 阅读全文
posted @ 2017-07-27 16:33 walfy 阅读(219) 评论(0) 推荐(0)
摘要: A水,直接看样例找规律,数组开小导致wa了一发。。。 #include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<vector> #include<cstdio> #include<cass 阅读全文
posted @ 2017-07-26 12:38 walfy 阅读(239) 评论(0) 推荐(0)
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 56 下一页