摘要:
创建线段树(初始化)】: 由于线段树是用二叉树结构储存的,而且是近乎完全二叉树的,所以在这里我使用了数组来代替链表上图中区间上面的红色数字表示了结构体数组中对应的下标。 在完全二叉树中假如一个结点的序号(数组下标)为 I ,那么 (二叉树基本关系) I 的父亲为 I/2, I 的另一个兄弟为 I/2 阅读全文
摘要:
逃离迷宫 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 22160 Accepted Submission(s): 5392 Problem D 阅读全文
摘要:
In a Lotto I have ever played, one has to select 6 numbers from the set {1,2,...,49}. A popular strategy to play Lotto - although it doesn't increase 阅读全文