http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4439题意:n个点的有向无环图,边有长度,从一个点到另一点消耗背包重量与边长的乘积。每个点卖物品,价值v,重量w,数量无限,给定起点,和背包容量,可以在任意点停止,问最大化所获得价...
                            
                            
                                分类:
其他好文   时间:
2014-08-06 22:31:32   
                                阅读次数:
290
                             
                    
                        
                            
                            
                                http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4257
难度远不及我之前发的...
但是我第一次的思路竟然错了,因为dp方程想设计成二维,但是弄错,也没发现原因,,,
改为一维:dp[s]:状态为s的时候,得到的最大能量,其中s第i位为1表示,i已经被撞毁
#include 
#include 
#include ...
                            
                            
                                分类:
其他好文   时间:
2014-08-06 19:02:42   
                                阅读次数:
250
                             
                    
                        
                            
                            
                                http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3181题意:就是混合背包加分组背包,有的物品是01背包,有的是多重背包,有的是完全背包,同时物品还有不超过8组的分组,如果在同一组则最多只能选一种。问能不能恰好地用掉D的容量,并且...
                            
                            
                                分类:
其他好文   时间:
2014-08-06 17:49:11   
                                阅读次数:
252
                             
                    
                        
                            
                            
                                ~~~~
输入好长。。。
思路就是对线路上的每一个点BFS记录各个点到其所需的star值,然后ans记录所需的最大star值,最后输出ans最小的star值及相应的id。
开始建链接矩阵,结果MLE,于是修改了下。
题目链接:
http://acm.hdu.edu.cn/showproblem.php?pid=2377
http://acm.zju.edu.cn/onlinejudge...
                            
                            
                                分类:
其他好文   时间:
2014-08-06 11:57:41   
                                阅读次数:
238
                             
                    
                        
                            
                            
                                Red and Black
Time Limit: 1000MS
 
Memory Limit: 30000K
Total Submissions: 22300
 
Accepted: 12041
Description
There is a rectangular room, covered with square tiles. Each ...
                            
                            
                                分类:
其他好文   时间:
2014-08-04 21:30:48   
                                阅读次数:
263
                             
                    
                        
                            
                            
                                Rescue
Time Limit: 2 Seconds      
Memory Limit: 65536 KB 
Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M 
Angel's friends want to s...
                            
                            
                                分类:
其他好文   时间:
2014-08-04 10:59:57   
                                阅读次数:
237
                             
                    
                        
                            
                            
                                Problem Description 
Continuous Same Game is a simple game played on a grid of colored blocks. Groups of two or more connected (orthogonally, not diagonally) blocks that are the same color may be r...
                            
                            
                                分类:
其他好文   时间:
2014-08-03 23:21:29   
                                阅读次数:
336
                             
                    
                        
                            
                            
                                题目链接题意 : 一根木棍,长8000,然后分别在不同的区间涂上不同的颜色,问你最后能够看到多少颜色,然后每个颜色有多少段,颜色大小从头到尾输出。思路 :线段树区间更新一下,然后标记一下,最后从头输出。//ZOJ 1610#include #include #include using namesp...
                            
                            
                                分类:
其他好文   时间:
2014-08-03 22:58:06   
                                阅读次数:
248
                             
                    
                        
                            
                            
                                ZOJ Problem Set - 3080ChiBiTime Limit:5 Seconds Memory Limit:32768 KBwatashi's mm is so pretty as well as smart. Recently, she has watched the movieCh...
                            
                            
                                分类:
其他好文   时间:
2014-08-03 20:20:15   
                                阅读次数:
362