List list = Arrays.asList(new Point(1, 5), new Point(2, 3),new Point(2, 8), new Point(9, 13));int sum = list.get(0).y - list.get(0).x,currenty=list.ge...
分类:
其他好文 时间:
2014-06-28 19:25:36
阅读次数:
183
Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path.Note:Yo...
分类:
其他好文 时间:
2014-06-28 15:55:58
阅读次数:
196
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:
其他好文 时间:
2014-06-28 14:31:12
阅读次数:
201
很久以前做的树形DP题,今天再遇到时,竟然不会了,所以写写。。设数组:prf[MAX][MAX],cost[MAX],sum[MAX]。分别表示,在第i个结点为根的子树内的情况下,若有j个用户申请看电视,所能得到的最大费用。cost表示传送到i点时所花的费用,而sum表示当前结点为根的子树内已访问的...
分类:
其他好文 时间:
2014-06-28 14:28:23
阅读次数:
293
--1、while循环declare @sum intdeclare @i intset @i=1set @sum=0while(@i90) print @iendprint @sum--2、goto语句declare @num intset @num=100flag:print @numsel.....
分类:
数据库 时间:
2014-06-28 13:30:20
阅读次数:
267
函数指针是指向函数的指针变量。每一个函数都有一个入口地址,该入口地址就是函数指针所指向的地址。有了指向函数的指针后,可用该指针变量调用函数。函数指针有两个用途:调用函数和做函数的参数。(1)函数指针的声明方法为:函数类型 (标志符指针变量名名) (形参列表);int sum(int a, in...
分类:
其他好文 时间:
2014-06-28 13:28:18
阅读次数:
154
函数指针一、函数指针定义//函数声明:声明我是一个什么函数//求两个数的和//函数的类型:int (int x,int y)//即:我是一个返回值为整型,有两个整型参数的函数。//函数名是 sumint sum(int x,int y);函数指针定义p是变量,其他是类型(通常没有形参a,b)//函数...
分类:
移动开发 时间:
2014-06-28 13:03:58
阅读次数:
295
令 $\dps{B(m,n)=\sum_{k=0}^n C_n^k \cfrac{(-1)^k}{m+k+1}}$, $m,n\in\bbN^+$. (1) 证明 $B(m,n)=B(n,m)$; (2) 计算 $B(m,n)$. 证明: (1) $$\beex \bea B(m,n)&=\sum_...
分类:
其他好文 时间:
2014-06-28 12:55:39
阅读次数:
182
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4745题意:n个数排成一个环。两个人AB初始时各自选定一个位置。每一轮A在顺时针方向选择一个位置,B在逆时针选择一个位置,且这两个人所选位置的数字相等,然后格子跳到新选的位置上。问最多进行多少轮?有一个限...
分类:
其他好文 时间:
2014-06-23 08:15:51
阅读次数:
262
题目链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3076题意:给出两个柱体,一个平行于z轴,设这个截面为A,在XOY面,一个平行于y...
分类:
其他好文 时间:
2014-06-23 07:04:32
阅读次数:
311