2019年8月4日

计蒜客 Flashing Fluorescents(状压DP)

摘要: You have nn lights, each with its own button, in a line. Pressing a light’s button will toggle that light’s state; if the light is on, it will turn of 阅读全文

posted @ 2019-08-04 23:29 大桃桃 阅读(310) 评论(0) 推荐(0) 编辑

计蒜客 Red Black Tree(树形DP)

摘要: You are given a rooted tree with n nodes. The nodes are numbered 1..n. The root is node 1, and m of the nodes are colored red, the rest are black. You 阅读全文

posted @ 2019-08-04 22:07 大桃桃 阅读(177) 评论(0) 推荐(0) 编辑

计蒜客 Zoning Houses(线段树区间最大次大)

摘要: Given a registry of all houses in your state or province, you would like to know the minimum size of an axis-aligned square zone such that every house 阅读全文

posted @ 2019-08-04 21:45 大桃桃 阅读(217) 评论(0) 推荐(0) 编辑

计蒜客 Prefix Free Code(字典树+树状数组)

摘要: Consider n initial strings of lower case letters, where no initial string is a prefix of any other initial string. Now, consider choosing k of the str 阅读全文

posted @ 2019-08-04 21:17 大桃桃 阅读(149) 评论(0) 推荐(0) 编辑

导航