码迷,mamicode.com
首页 >  
搜索关键字:two sum    ( 31846个结果
Swap Nodes in Pairs
Link:http://oj.leetcode.com/problems/swap-nodes-in-pairs/Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2-...
分类:其他好文   时间:2014-05-05 22:45:37    阅读次数:331
【LeetCode OJ】Word Ladder I
Problem Link:http://oj.leetcode.com/problems/word-ladder/Two typical techniques are inspected in this problem:Hash Table. One hash set is the words di...
分类:其他好文   时间:2014-05-05 22:44:44    阅读次数:393
一道模拟题
问题:把英文单词表示的数字转换为阿拉伯数字,要求数字不超过整形范围,数字形如abc,def,hrg。第一行表示有几组数据,第二行输入英文。输出:相应的阿拉伯数字。例如:input: 3 eleven one hundred and two output: 11102分析:要注意百万和千要断位,还有要...
分类:其他好文   时间:2014-05-04 12:32:10    阅读次数:326
数学公式再次测试
\begin{align*}\sum_{n=0}^{\infty}\frac{(n!)^{2}2^{n+1}}{(2n+1)!}&=\sum_{n=0}^{\infty}\int_{0}^{1}t^{n}(1-t)^{n}2^{n+1}dt\\&=2\int_{0}^{1}\sum_{0}^{\in...
分类:其他好文   时间:2014-05-04 12:28:56    阅读次数:284
SQL Server 基础 04 函数与分组查询数据
函数与分组查询数据系统函数分聚合函数、数据类型转换函数、日期函数、数学函数 . . . 1、 聚合函数 主要是对一组值进行计算,然后返回一个值。 聚合函数包括 sum(求和)、avg(求平均值)、min()、max()、...
分类:数据库   时间:2014-05-04 11:01:38    阅读次数:402
【级数】 求和
证明 \[\sum_{n=0}^{\infty}\frac{(n!)^{2}2^{n+1}}{(2n+1)!}=\pi\]分析:这道题初看具有难度运用幂级数恐难解决,由分子分母的特性易想到 $\Gamma$函数然后利用$\Gamma$函数与$\beta$函数的关系即可。Proof:\begin{al...
分类:其他好文   时间:2014-05-03 22:29:12    阅读次数:296
codechef Sums in a Triangle题解
Let's consider a triangle of numbers in which a number appears in the first line, two numbers appear in the second line, three in the third line, etc. Develop a program which will compute the largest ...
分类:其他好文   时间:2014-05-03 17:32:22    阅读次数:284
[ACM] hdu 3415 Max Sum of Max-K-sub-sequence (单调队列)
Max Sum of Max-K-sub-sequence Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5673    Accepted Submission(s): 2049 Problem Description...
分类:其他好文   时间:2014-05-03 16:30:10    阅读次数:412
codechef The Lead Game 题解
The game of billiards involves two players knocking 3 balls around on a green baize table. Well, there is more to it, but for our purposes this is sufficient. The game consists of several rounds ...
分类:其他好文   时间:2014-05-03 16:15:33    阅读次数:296
codechef Enormous Input Test 快速读入数据 fread
本题就是测试读入数据的速度的。 如果有大量的数据读入,使用cin是很慢的。 那么使用scanf那么会快很多,但是如果数据量更大的话那么就还是不够快了。 所以这里使用fread。 首先开一个buffer,然后使用fread大块大块地读入数据就可以非常快地读入了。 题目如下: Input The input begins with two positive...
分类:其他好文   时间:2014-05-03 16:13:21    阅读次数:340
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!