Apple CatchingTime Limit:1000MSMemory Limit:65536KTotal Submissions:8759Accepted:4264DescriptionIt is a little known fact that cows love apples. Farme...
                            
                            
                                分类:
移动开发   时间:
2015-05-04 20:08:35   
                                阅读次数:
152
                             
                    
                        
                            
                            
                                The Cow LineupTime Limit:1000MSMemory Limit:30000KTotal Submissions:5367Accepted:3196DescriptionFarmer John's N cows (1 #include #include #include #in...
                            
                            
                                分类:
其他好文   时间:
2015-05-04 19:52:28   
                                阅读次数:
124
                             
                    
                        
                            
                            
                                Sightseeing Cows
Time Limit: 1000MS
 
Memory Limit: 65536K
Total Submissions: 8220
 
Accepted: 2757
Description
Farmer John has decided to reward his cows for their hard ...
                            
                            
                                分类:
其他好文   时间:
2015-05-03 09:19:59   
                                阅读次数:
175
                             
                    
                        
                            
                            
                                首先比较容易想到是状态压缩DP令$f[S]$表示选取了集合$S$以后,已经送了最少次数cnt且当前电梯剩下的体积rest最大(即$f[S]$是一个二元组(cnt, rest))于是$f[S] = min_{i \in S} f[S - {i}] + v[i]$$11 #include 12 13 ....
                            
                            
                                分类:
其他好文   时间:
2015-05-01 22:30:27   
                                阅读次数:
230
                             
                    
                        
                            
                            
                                Time Limit:1000MSMemory Limit:65536KTotal Submissions:32824Accepted:11098DescriptionBessie is out in the field and wants to get back to the barn to ge...
                            
                            
                                分类:
编程语言   时间:
2015-05-01 16:07:11   
                                阅读次数:
230
                             
                    
                        
                            
                            
                                HotelTime Limit:3000MSMemory Limit:65536KTotal Submissions:13124Accepted:5664DescriptionThe cows are journeying north to Thunder Bay in Canada to gain...
                            
                            
                                分类:
其他好文   时间:
2015-05-01 11:56:08   
                                阅读次数:
103
                             
                    
                        
                            
                            
                                这一题,也是简单的二分搜索,求解放置的牛之间的距离尽可能远,也就是最大化最小值。
主要的一步就是将第i头牛放在了x[j]的位置中,第i + 1
头牛就要放在满足x[j] + d ,k的最小值。
下面是AC的代码:
#include 
#include 
using namespace std;
int N, M;
int X[100005];
bool C(int x)
{
	int ...
                            
                            
                                分类:
其他好文   时间:
2015-04-30 23:19:52   
                                阅读次数:
378
                             
                    
                        
                            
                            
                                题目链接: http://poj.org/problem?id=3281题目大意: 有n头牛,f种食物,d种饮料,第i头牛喜欢fi种食物和di种饮料,每种食物或者饮料被一头牛选中后,就不能被其他的牛选了,问最多能满足多少头牛的要求?解题思路: 最大匹配问题,关键在于如何建图,可以虚构出来一个源...
                            
                            
                                分类:
其他好文   时间:
2015-04-30 17:35:16   
                                阅读次数:
133
                             
                    
                        
                            
                            
                                Sightseeing CowsTime Limit:1000MSMemory Limit:65536KTotal Submissions:8218Accepted:2756DescriptionFarmer John has decided to reward his cows for their...
                            
                            
                                分类:
其他好文   时间:
2015-04-30 16:06:09   
                                阅读次数:
135
                             
                    
                        
                            
                            
                                Time Limit: 5000MS
 
Memory Limit: 65536K
Total Submissions: 37683
 
Accepted: 17656
Case Time Limit: 2000MS
Description
For the daily milking, Farmer John's N cows (1 ≤ N ≤ ...
                            
                            
                                分类:
其他好文   时间:
2015-04-29 17:17:38   
                                阅读次数:
139