背包问题时间限制:3000ms | 
内存限制:65535KB难度:3描述现在有很多物品(它们是可以分割的),我们知道它们每个物品的单位重量的价值v和重量w(1#include#include#include 
#include#includeusing namespace std;struct ba....
                            
                            
                                分类:
其他好文   时间:
2014-04-30 15:46:29   
                                阅读次数:
443
                             
                         
                    
                        
                            
                            
                                模线性方程的基本应用#includeusing namespace std;int exgcd(int 
a,int b,int &x,int &y){ if(b==0) { x=1; y=0; return a; } int d=ex...
                            
                            
                                分类:
其他好文   时间:
2014-04-30 14:33:27   
                                阅读次数:
326
                             
                         
                    
                        
                            
                            
                                #includeusing namespace std;int main(){ char 
a,b,c; while(scanf("%c%c%c",&a,&b,&c)!=EOF) { getchar(); 
cout<<a<<b<<c<<endl; } retur...
                            
                            
                                分类:
其他好文   时间:
2014-04-30 14:00:36   
                                阅读次数:
346
                             
                         
                    
                        
                            
                            
                                #include#include#include#include #includeusing 
namespace std;char c[1000005];int main(int argc, char* argv[]){	int 
n;	scanf("%d", &n); while(n--)	{	.....
                            
                            
                                分类:
其他好文   时间:
2014-04-29 16:31:46   
                                阅读次数:
286
                             
                         
                    
                        
                            
                            
                                好高兴 一上午做了2个题 题意:求素因子只有2 3 5 7 数 约束的个数 我用的时搜索计数法 
感觉还应该有比较不错的组合数学方法#includeusing namespace std;__int64 dmax;int prime[4];void 
dfs(int t){	if(t>=4)	{	...
                            
                            
                                分类:
其他好文   时间:
2014-04-29 11:21:47   
                                阅读次数:
278
                             
                         
                    
                        
                            
                            
                                【广搜模板】#include #include #include #include using 
namespace std;#define MAXX #define MAXYstruct Node{ int x,y; int step;};int n,m; 
//边界int dx[4...
                            
                            
                                分类:
其他好文   时间:
2014-04-29 11:14:46   
                                阅读次数:
334
                             
                         
                    
                        
                            
                            
                                第一次打表一言难尽 注意表的范围 因为打表 数组长度不好计算算 
要有个结尾标志#includeusing namespace std;int 
prime[1000]={5,7,11,101,131,151,181,191,313,353,373,383,727,757,787,797,919,9.....
                            
                            
                                分类:
其他好文   时间:
2014-04-29 10:27:47   
                                阅读次数:
471
                             
                         
                    
                        
                            
                            
                                //现在输入一个正整数k,找到所有的正整数x>=y,使得1/k=1/x+1/y.#includeusing 
namespace std;int main(){ int n; //测试数据组数 cin>>n; int y; double x; 
while(n--) ...
                            
                            
                                分类:
其他好文   时间:
2014-04-29 09:38:47   
                                阅读次数:
360
                             
                         
                    
                        
                            
                            
                                #includeusing namespace std;int main(){ int N; 
//测试数据组数 cin>>N; while(N--) { int M; //百分制成绩 cin>>M; int a=M/10; ...
                            
                            
                                分类:
其他好文   时间:
2014-04-29 09:38:47   
                                阅读次数:
409
                             
                         
                    
                        
                            
                            
                                由于n比较小,直接暴力解决#include #include #include #include 
#include #includeusing namespace std;int main(){ int n,k; cin >> n 
>> k; vector a(n); for...
                            
                            
                                分类:
其他好文   时间:
2014-04-29 09:18:46   
                                阅读次数:
412