自己伸展树做的第一个题poj 3580 supermemo.题目大意对一个数组进行维护,包含如下几个操作:ADD x, y, d 在 A[x]--A[y] 中的每个数都增加dREVERSE x, y 将 A[x]--A[y] 中的数进行反转,变为 A[y],A[y-1]....A[x+1],A[x]...
分类:
其他好文 时间:
2015-08-08 21:17:37
阅读次数:
102
称号:hdoj 5087 Revenge of LIS II题意:非常easy,给你一个序列,让你求第二长单调递增子序列。分析:事实上非常easy。不知道比赛的时候为什么那么多了判掉了。我们用O(n^2)的时间求单调递增子序列的时候,里面在加一层循环维护sum数组。表示前面有几个能够转移当当前,求前...
分类:
其他好文 时间:
2015-08-08 21:17:05
阅读次数:
115
https://zh.wikipedia.org/zh/%E6%B0%A8%E5%9F%BA%E9%85%B8氨基酸(英文:Amino acid)是生物學上重要的有機化合物,它是由胺(-NH2)和羧酸(-COOH)的官能團組成的,以及一個側鏈连到每一個氨基酸。氨基酸是構成蛋白質的基本單位,賦予蛋白質...
分类:
其他好文 时间:
2015-08-08 21:17:16
阅读次数:
372
Given an array ofnintegers wheren> 1,nums, return an arrayoutputsuch thatoutput[i]is equal to the product of all the elements ofnumsexceptnums[i].Solv...
分类:
其他好文 时间:
2015-08-08 21:17:51
阅读次数:
128
1 #include 2 #include 3 #include 4 #define PI 3.1415926 5 BOOLEAN InitWindowClass(HINSTANCE hInstance, int nCmdShow); 6 LRESULT CALLBACK Wnd...
分类:
其他好文 时间:
2015-08-08 21:17:23
阅读次数:
117
1.定义当对数组和集合进行遍历时,可以使用增强for循环。增强for循环的效果和iterator相同,其内部是通过调用iteratoer实现的。但是增强for循环存在以下缺点:1)不能动态地删除集合或数组内容2)完整的遍历集合或数组,而不能只遍历部分3)在遍历集合或数组时,不能获取当前元素下标2.格...
分类:
其他好文 时间:
2015-08-08 21:18:13
阅读次数:
104
Given two sorted integer arraysnums1andnums2, mergenums2intonums1as one sorted array.Note:You may assume thatnums1has enough space (size that is great...
分类:
其他好文 时间:
2015-08-08 21:15:02
阅读次数:
97
前言: GOF经典的23种设计模式在IT界现已被广为流传。由于比较长时间没有用了,个人对于不同模式与模式之间的区别也渐渐模糊,故开始重温设计模式的思想。也希望更给对设计模式感兴趣的朋友些许的启发。---------------------------------- 需求情境: 设计一款具有基本...
分类:
其他好文 时间:
2015-08-08 21:15:30
阅读次数:
101
TopologyObjectives:Use BGP commands to prevent private AS numbers from being advertised to the outside world.Use the AS_PATH attribute to filter BGP r...
分类:
其他好文 时间:
2015-08-08 21:15:19
阅读次数:
299
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to thedefinition of LCA on Wikipedia: “The lowest ...
分类:
其他好文 时间:
2015-08-08 21:15:30
阅读次数:
110
1. 子程序是为实现特定目的而编写的一个可被调用的方法(method)或过程(procedure),例如c++中的函数、java中的方法子程序避免代码段重复,提高代码可读性,同时方便代码改动2. 好的子程序名字(1) 避免使用无意义、模糊不清的动词,例如processInput()(2) 根据需要确...
分类:
其他好文 时间:
2015-08-08 21:14:58
阅读次数:
135
https://zh.wikipedia.org/wiki/%E8%9B%8B%E7%99%BD%E8%B4%A8蛋白质是一种由氨基酸分子组成的有机化合物,旧称“朊”[1]。氨基酸分子呈线性排列,相邻氨基酸残基的羧基和氨基通过肽键连接在一起。蛋白质的氨基酸序列是由对应基因所编码。除了遗传密码所编码的...
分类:
其他好文 时间:
2015-08-08 21:13:15
阅读次数:
359
重点:1.蛋白质 组成,多样化,合成2.氨基酸 结构通式,20种氨基酸分子式,连接方法3.蛋白质多样化原因不懂:羧基,氨基,脱水缩合,肽键,二钛,多肽词汇:protein 蛋白质Proteinis a substance found in food and drink such as meat, e...
分类:
其他好文 时间:
2015-08-08 21:13:51
阅读次数:
657
20世纪40年代中期,桑格(Frederick Sanger,1918—)领导的研究组搞清楚了胰岛素的全部氨基酸序列。他们选择胰岛素作为研究对象,一是因为胰岛素普遍存在,二是因为胰岛素比其他蛋白质小,三是因为胰岛素是糖尿病患者的特效药物。桑格的工作第一次表明了蛋白质是氨基酸通过肽键连接在一起的聚合物...
分类:
其他好文 时间:
2015-08-08 21:14:19
阅读次数:
4842
http://poj.org/problem?id=3041AsteroidsTime Limit:1000MSMemory Limit:65536KTotal Submissions:17543Accepted:9548DescriptionBessie wants to navigate her...
分类:
其他好文 时间:
2015-08-08 21:12:54
阅读次数:
175
Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is1 -> 2 -> 3 -> ...
分类:
其他好文 时间:
2015-08-08 21:12:33
阅读次数:
120
#include #include #include #include using namespace std;const int maxn = 310;const int INF = 0x3f3f3f3f;int maps[maxn][maxn], lx[maxn], ly[maxn];int v...
分类:
其他好文 时间:
2015-08-08 21:11:08
阅读次数:
97