posted @ 2017-04-24 22:19 蓝空 阅读(125) 评论(0) 推荐(0) 编辑
摘要:
Color Circle There are colorful flowers in the parterre in front of the door of colle... 阅读全文
|
||
摘要:
Color Circle There are colorful flowers in the parterre in front of the door of colle... 阅读全文
posted @ 2017-04-24 22:19 蓝空 阅读(125) 评论(0) 推荐(0) 编辑
摘要:
题意:给你一棵二叉树,点有点权,每次往左或者往右走,求最长走的路,并且点权和小于k; 思路:官方题解,尺取,我的写法,树上二分, 对于一条链,枚举每个点为终点,vector存该点到根节点的前缀和,二分一下即可; 详见代码; 借鉴下网友代码! #pra... 阅读全文
posted @ 2017-04-24 22:00 蓝空 阅读(141) 评论(0) 推荐(0) 编辑
摘要:
Problem D: GCD Time Limit: 1 Sec Memory Limit: 1280 MB Submit: 194 Solved: 27 [Submit][Status][Web Board] Description Input The fir... 阅读全文
posted @ 2017-04-24 21:47 蓝空 阅读(297) 评论(0) 推荐(0) 编辑
摘要:
1201: Friends Time Limit: 1 Sec Memory Limit: 1280 MB Submit: 98 Solved: 16 [Submit][Status][Web Board] Description In a country, the re... 阅读全文
posted @ 2017-04-24 18:42 蓝空 阅读(143) 评论(0) 推荐(0) 编辑
摘要:
1199: Little Red Riding Hood Time Limit: 1 Sec Memory Limit: 1280 MB Submit: 876 Solved: 139 [Submit][Status][Web Board] Description ... 阅读全文
posted @ 2017-04-24 18:33 蓝空 阅读(144) 评论(0) 推荐(0) 编辑
摘要:
先求求后面的最小值前缀,也就是预处理1~i的最小值,然后从右往左双指针,维护右端点>左端点,如果右端点using namespace std;#define MAXN (100000+5)#define INF 0x3f3f3f3fint n,k,arr[MAXN],mmin[MAX... 阅读全文
posted @ 2017-04-24 16:02 蓝空 阅读(208) 评论(0) 推荐(0) 编辑 |
||