coder_new

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2014年2月8日

摘要: #include #include #define N 5int getMaxSum(int a[N]){ int sumTemp=0, sum=a[0]; int i; for(i=0; i<N; i++) { if(sumTemp<0) sumTemp=a[i]; else sumTemp+=a[i]; if(sum<sumTemp) sum=sumTemp; } return sum;}int main(){ int a[]={-1,5,2,-2,8}; printf("%d\n", getMaxS... 阅读全文
posted @ 2014-02-08 09:57 coder_new 阅读(151) 评论(0) 推荐(0) 编辑

2013年12月27日

摘要: 最大堆:排序以及最小k个数堆排序:不稳定,平均情况和最坏情况的时间复杂度O(nlogn),空间复杂度O(1)void swap(int *a, int *b){ int temp; temp=*a; *a=*b; *b=temp;}void heapDown(int *a, int n){ if(n=1;i--) { swap(&a[i],&a[0]); heapDown(a,i-1); }}void minK(int *a, int n, int k){ if(n<=0) return; if(k<=0) re... 阅读全文
posted @ 2013-12-27 15:58 coder_new 阅读(230) 评论(0) 推荐(0) 编辑

2013年5月14日

摘要: 一、Aplications(应用层) Android 将会有一些核心的应用,比如邮件客户端、SMS程序、计算器、地图、浏览器、联系人等等。所有的应用程序都用Java语言开发。二、Application Framework(应用框架层) 这一层是编写Google发布的核心应用时所使用的API框架,开发人员可以使用这些框架来开发自己的应用。 View System:可以用来构建应用程序,它包括列表、网格、文本框、按钮以及可嵌入的Web浏览器。 Content Providers:它可以让一个应用访问另一个应用的数据,或共享它们自己的数据。 Resource Manager:提供非代码资源... 阅读全文
posted @ 2013-05-14 22:24 coder_new 阅读(143) 评论(0) 推荐(0) 编辑

2012年5月15日

摘要: 关系数据库设计范式简介 关系数据库中的关系必须满足一定的要求,即满足不同的范式。 目前关系数据库有六种范式:第一范式(1NF)、第二范式(2NF)、第三范式(3NF)、第四范式(4NF)、第五范式(5NF)和第六范式(6NF)。满足最低要求的范式是第一范式(1NF)。在第一范式的基础上进一步满足更多要求的称为第二范式(2NF),其余范式以次类推。一般说来,数据库只需满足第三范式(3NF)就行了。第一范式(1NF)无重复的列 所谓第一范式(1NF)是指数据库表的每一列都是不可分割的基本数据项,同一列中不能同时有多个值,即实体中的某个属性不能有多个值或者不能有重复的属性。如果出现重复的属性,... 阅读全文
posted @ 2012-05-15 08:59 coder_new 阅读(140) 评论(0) 推荐(0) 编辑

2012年5月10日

摘要: DescriptionIn a modernized warehouse, robots are used to fetch the goods. Careful planning is needed to ensure that the robots reach their destinations without crashing into each other. Of course, all warehouses are rectangular, and all robots occupy a circular floor space with a diameter of 1 meter 阅读全文
posted @ 2012-05-10 17:33 coder_new 阅读(214) 评论(0) 推荐(0) 编辑

2012年5月9日

摘要: DescriptionLet S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways: q By an integer sequence P = p1 p2...pn where pi is the number of left parentheses before the ith right parenthesis in S (P-sequence). q By an integer sequence W = w1 w2...wn where for each 阅读全文
posted @ 2012-05-09 23:07 coder_new 阅读(177) 评论(0) 推荐(0) 编辑

摘要: DescriptionWFF 'N PROOF is a logic game played with dice. Each die has six faces representing some subset of the possible symbols K, A, N, C, E, p, q, r, s, t. A Well-formed formula (WFF) is any string of these symbols obeying the following rules:p, q, r, s, and t are WFFsif w is a WFF, Nwis a W 阅读全文
posted @ 2012-05-09 19:59 coder_new 阅读(282) 评论(1) 推荐(0) 编辑

摘要: DescriptionAccounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc. All what they remember is that MS Inc. posted a surplus or a deficit each month of 1999 and each month when MS Inc. posted surplus, the amount of surplu 阅读全文
posted @ 2012-05-09 16:18 coder_new 阅读(235) 评论(0) 推荐(0) 编辑

摘要: DescriptionCurrent work in cryptography involves (among other things) large prime numbers and computing powers of numbers among these primes. Work in this area has resulted in the practical use of results from number theory and other branches of mathematics once considered to be only of theoretical 阅读全文
posted @ 2012-05-09 13:53 coder_new 阅读(143) 评论(0) 推荐(0) 编辑

2012年5月8日

摘要: DescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on the coasting, can only cover d distance, so an island in the sea can be covered by a radius i 阅读全文
posted @ 2012-05-08 17:56 coder_new 阅读(279) 评论(0) 推荐(0) 编辑