题目链接:点击打开链接
题意:n长的序列(初始全为0) m个操作 k个查询
下面m个操作[l,r] h 代表 a[l] +=h; a[l+1] += h+i; a[l+i] += h+i; l
然后问k个位置的和
因为k
-----------------------
如果k
只需要给区间记录一个标记lazy,表示从左端点开始 l, l+1, l+i ··· l+r
而向下更新时...
分类:
其他好文 时间:
2014-08-04 17:40:57
阅读次数:
186
题目:Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains on....
分类:
编程语言 时间:
2014-08-04 13:57:17
阅读次数:
242
1. Single Responsibilityhttp://en.wikipedia.org/wiki/Single_responsibility_principle (ToRead)2. Open/Closedhttp://en.wikipedia.org/wiki/Open/closed_pr...
分类:
其他好文 时间:
2014-08-03 23:07:06
阅读次数:
216
默认demo,在64bit模拟器上会link不过:target 中的 architectures 的valid architectrues里面,去掉arm64,build active architecture only: 改为no
分类:
移动开发 时间:
2014-08-03 17:50:05
阅读次数:
342
Java Cryptography Architecture Standard Algorithm Name Documentation for JDK 8:
http://docs.oracle.com/javase/8/docs/api/index.html...
分类:
编程语言 时间:
2014-08-02 12:56:03
阅读次数:
400
题目:Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given "25525511135",return [....
分类:
编程语言 时间:
2014-08-02 09:49:53
阅读次数:
287
Longest Valid ParenthesesGiven a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substr...
分类:
其他好文 时间:
2014-08-02 04:22:40
阅读次数:
248
关键点 实现过程 voidCCreateBrushView::OnDraw(CDC*pDC) { CCreateBrushDoc*pDoc=GetDocument(); ASSERT_VALID(pDoc); //创...
分类:
编程语言 时间:
2014-08-01 22:41:42
阅读次数:
277
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example, "A man, a plan, a canal: Pan...
分类:
其他好文 时间:
2014-08-01 22:31:42
阅读次数:
208
题目:Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled ....
分类:
编程语言 时间:
2014-08-01 10:31:31
阅读次数:
261