觉得浮夸了四年,漠然发现原来是浮躁了四年!

摘要: Problem link adress:http://acm.hdu.edu.cn/showproblem.php?pid=2645//*****analysis*****//The meaning of the problem is simple.In the map consist of '0' and '1',find the nearest '1' for every '0'.Clearly, we should use bfs work out every nearest station.Is it brute forc 阅读全文
posted @ 2013-03-02 23:17 heat nan 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Problem Link adress:http://acm.hdu.edu.cn/showproblem.php?pid=1171Problem analysis:本题可以转换为多重背包问题。DP算法的最大特点就是计算最优解。题目大意:计算机学院要分成计算机学院和软件学院,即这两个新的学院要“分家”,要求尽可能的公平,即两家学院分的的财产尽可能的接近,如果实在无法保证相等的话,计算机学院分的的财产不能少于软件学院的。可以以财产的总和的一半为背包,求的背包最大值。因为每件物品可以有很多件,所以本题为多重背包问题,可以把多重背包转化为01背包来解决。#include<iostream> 阅读全文
posted @ 2013-03-02 19:46 heat nan 阅读(246) 评论(0) 推荐(0) 编辑
摘要: B. Taxitime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group consists of si friends (1 ≤ si ≤ 4), and they 阅读全文
posted @ 2013-03-02 12:19 heat nan 阅读(259) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示