码迷,mamicode.com
首页 >  
搜索关键字:hdu 2612 find a way    ( 56705个结果
hdu 1179 最大匹配
题意:n个ren m个棍子 每个棍子可以与i个人结合 问最大有多少个结合#include#includeusing namespace std;int map[111][111];int fa[111];int v[111];int n,m;int dfs(int x){ for(int i=...
分类:其他好文   时间:2014-05-01 13:22:34    阅读次数:422
Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3....
分类:其他好文   时间:2014-04-29 13:47:20    阅读次数:251
Use UMDH to identify memory leak problem
We sometimes got memory leak problem, and we need to find the leaked memory, Here is a useful tool from MS, UMDH, it is included in WinDBG install package. Here is a introduction on how to UMDH to identify memory leak problems...
分类:其他好文   时间:2014-04-29 13:38:21    阅读次数:374
HDU 3080 The plan of city rebuild(prim和kruskal)
The plan of city rebuild Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 616    Accepted Submission(s): 215 Problem Description New...
分类:其他好文   时间:2014-04-29 13:22:21    阅读次数:438
[ACM] hdu 1203 I NEED A OFFER!(小数背包)
解题思路: 求至少收到一份OFFER的最大概率,为了简化问题,求一份OFFER也没有收到的最小概率,然后1减去它就可以了。采用01背包,装入一份OFFER也没收到总概率的最小值,那么1减去它就是收到至少一份OFFER的最大概率。注意:dp[最大容量] 要有值,初始化时,而且本题dp数组初始化值为1 代码: #include #include #include using name...
分类:其他好文   时间:2014-04-29 13:21:22    阅读次数:321
Leetcode:Minimum Path Sum 最小路径和
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move either down or right at...
分类:其他好文   时间:2014-04-28 10:46:41    阅读次数:311
Hdu 1042 N! (高精度数)
Problem Description Given an integer N(0 ≤ N ≤ 10000), your task is to calculate N!   Input One N in one line, process to the end of file.   Output For each N, output N! i...
分类:其他好文   时间:2014-04-28 10:36:41    阅读次数:341
基础树形DP小结
HDU 1520  Anniversary party 隔层选取,比较基础的树形DP了。 HDU 2196 Computer 我只想说一句这是毛线DP,明明是图论好么。 两次BFS求出权值和最大的一条链,再用两次BFS更新各点最大值。 搜了一下,真的有人用DP做,貌似更快一些。...
分类:其他好文   时间:2014-04-28 10:33:42    阅读次数:282
Sdut 2409 The Best Seat in ACM Contest(山东省第三届ACM省赛 H 题)(模拟)
题目描述 Cainiao is a university student who loves ACM contest very much. It is a festival for him once when he attends ACM Asia Regional Contest because he always can find some famous ACMers there. C...
分类:其他好文   时间:2014-04-28 10:33:40    阅读次数:340
hdu 1595 find the longest of the shortest(dijstra + 枚举)
http://acm.hdu.edu.cn/showproblem.php?pid=1595 大致题意: 给一个图,让输出从中删除任意一条边后所得最短路径中最长的。。 思路: 直接枚举每条边想必是不行的。其实有些边是不需要枚举的,因为删除它们并不影响起点到终点的最短路。起作用的边都是未删边前的最短路径上的边,删除它们最短距离肯定增大,只需在这些最短距离中求最大的即可。 记录最短路...
分类:Web程序   时间:2014-04-28 10:24:42    阅读次数:393
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!