2017年4月10日

ZOJ Seven-Segment Display 暴力dfs + 剪枝

摘要: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3954 A seven segment code of permutation p is a set of seven segment code derived from th 阅读全文

posted @ 2017-04-10 23:56 stupid_one 阅读(201) 评论(0) 推荐(0) 编辑

Codeforces Beta Round #12 (Div 2 Only) D. Ball 树状数组查询后缀、最值

摘要: http://codeforces.com/problemset/problem/12/D 这里的BIT查询,指的是查询[1, R]或者[R, maxn]之间的最值,这样就够用了。 设三个权值分别是b[1], b[2], b[2]; 首先,先把b[1]值离散化,离散成一个个id,那么只能是在id比较 阅读全文

posted @ 2017-04-10 19:39 stupid_one 阅读(226) 评论(0) 推荐(0) 编辑

51NOD 1202 子序列个数 DP

摘要: http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1202&judgeId=225600 这题看起来挺复杂,但是真正的dp还是挺好理解的。唯独是想不到的,应该把样例模拟一遍。 比如1、2、4、2 考虑第一个,只有“1”这一个子 阅读全文

posted @ 2017-04-10 00:05 stupid_one 阅读(259) 评论(0) 推荐(0) 编辑

导航