2019年8月27日CF群打卡题: 1208A, 1208B, 1208C https://codeforces.com/problemset/problem/1208/A/ https://cod ...
codeforces-399B Red and Blue Balls
描述原题在这: https://codeforces.com/problemset/problem/399/B给一个用字符串表示的栈, R表示红球, B表示蓝球. 按照以下规则按顺序操作(循环), 直 ...
leetcode-715 Range Module
描述实现一个数据结构, 支持对区间的动态tracking, 分别有以下三个操作: addRange(int left, int right) 新增一个左闭右开的tracking区间[left, ri ...
leetcode-218 The Skyline Problem
描述原题在这: https://leetcode.com/problems/the-skyline-problem/ 思路分治分为divide和merge两部分, divide比较简单, 一直对半分, ...
leetcode-736 Parse Lisp Expression
描述题目本身比较长, 大意是parse一个lisp like的语言. 可以从样例中get到信息: (add 1 2) 返回1+2 => 3. (mult 3 (add 2 3)) 先计算2+3 ...
leetcode-1168 Optimize Water Distribution in a Village
描述There are n houses in a village. We want to supply water for all the houses by building wells and ...
leetcode-1172 Dinner Plate Stacks
描述原题在这: https://leetcode.com/problems/dinner-plate-stacks/ You have an infinite number of stacks arr ...
leetcode-1163 Last Substring in Lexicographical Order
描述给一个字符串,返回字典序最大的substring. 思路常规解法是后缀数组(倍增法), 然后拿到sa数组最后一个元素(最大substring起始点). 最优解是用类似字符串最小表示法的O(n)解 ...