码迷,mamicode.com
首页 >  
搜索关键字:two sum    ( 31846个结果
Codeforces Helpful Maths
Xenia the beginner mathematician is a third year student at elementary school. She is now learning the addition operation. The teacher has written down the sum of multiple numbers. Pupils should ca...
分类:其他好文   时间:2014-07-22 23:05:53    阅读次数:382
UVA 1484 - Alice and Bob's Trip(树形DP)
题目链接:1484 - Alice and Bob's Trip 题意:BOB和ALICE这对狗男女在一颗树上走,BOB先走,BOB要尽量使得总路径权和大,ALICE要小,但是有个条件,就是路径权值总和必须在[L,R]之间,求最终这条路径的权值。 思路:树形dp,dp[u]表示在u结点的权值,往下dfs的时候顺带记录下到根节点的权值总和,然后如果dp[v] + w + sum 在[l,r]内,...
分类:其他好文   时间:2014-07-22 23:05:33    阅读次数:486
Codeforces Amusing Joke 题解
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the letter...
分类:其他好文   时间:2014-07-22 23:03:53    阅读次数:521
LeetCode - Best Time to Buy and Sell 3
这道题在前两个的基础上做稍微改进就可以。下面是AC代码: 1 /** 2 * Design an algorithm to find the maximum profit. You may complete at most two transactions. 3 * @pa...
分类:其他好文   时间:2014-07-22 23:01:13    阅读次数:251
leetcode__Add Two Numbers && Climbing Stairs
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 digit. Add the two numbers and return it as a link...
分类:其他好文   时间:2014-05-01 22:08:19    阅读次数:366
Add Two Numbers
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-05-01 20:18:54    阅读次数:425
[伯努利数] poj 1707 Sum of powers
题目链接: http://poj.org/problem?id=1707 Language: Default Sum of powers Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 735   Accepted: 354 D...
分类:其他好文   时间:2014-05-01 18:36:32    阅读次数:385
problem-whether two headless linked lists cross
whether two nohead-linkedlist have the same end 个人信息:就读于燕大本科软件工程专业 目前大三; 本人博客:google搜索“cqs_2012”即可; 个人爱好:酷爱数据结构和算法,希望将来从事算法工作为人民作出自己的贡献; 博客内容:在无头节点的链表里删除元素; 博客时间:2014-4-15; 编程语言:C+...
分类:其他好文   时间:2014-05-01 18:13:31    阅读次数:352
[ACM] hdu 1003 Max Sum(最大子段和模型)
Max Sum Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 135262    Accepted Submission(s): 31311 Problem Description   Given a sequen...
分类:其他好文   时间:2014-04-30 22:21:40    阅读次数:280
SQL Mirroring[Hot back up with Double machine]
Background: It's fairly common for businesses to want to provide some high availability for their SQL Server databases, and one option is to have two SQL Server databases on separate machines with a SQL Server database mirrored....
分类:数据库   时间:2014-04-30 22:11:38    阅读次数:520
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!