自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 欧拉路

#includeusing namespace std;int main(){ int n; int s; int e; int flag1,flag2,flag3;//标记起点,终点和中间状态的度数 flag1=0; flag2=0; flag3=0; long m; int point[1005][2]={0}; //【0】表示出度,【1】表示入度 cin>>n>>

2012-12-14 00:49:08 220

转载 Family Name List (HDU 4409)

周赛的题目,废了好大劲才看懂的,STL不够熟悉,需要近一步训练啊点击打开链接http://blog.sina.com.cn/s/blog_79aa283901018w01.html 转载地址#include #include #include #include #include #include #include using namespace std;int

2012-12-08 00:20:18 331

原创 1055: 石子合并2

这题和前一篇文章几乎一样,只是石子堆变成了圆,也是受这篇博客启发http://www.cnblogs.com/SCAU_que/articles/1893979.html#include #define N 205 /* *求合并过程中 *最少合并堆数目 **/ int MatrixChain_min(int p[N],int n) { //

2012-12-07 22:06:04 227

原创 1051: 石子合并1

看到这个博客点击打开链接http://www.cnblogs.com/SCAU_que/articles/1893979.html才看懂的,用博主的代码完全可以A掉这题,真心感谢博主,啦啦啦另附上本题代码#include #define N 205 /* *求合并过程中 *最少合并堆数目 **/ int MatrixChain_min(int p[N],int

2012-12-07 21:52:42 269

原创 1048: 采药2

点击打开链接http://sdnuacm.sinaapp.com/problem.php?id=1048#include#includeusing namespace std;int main(){ int m,n,w,v; int max=0; int f[1005]={0}; scanf("%d%d",&m,&n); for(int i=1;i<=n;i++) {

2012-12-05 00:34:04 240

原创 1044: 任意进制转换

点击打开链接http://sdnuacm.sinaapp.com/problem.php?id=1044#includeint main(){ long n; int m,i=0; int num[64]={0}; scanf("%d%d",&n,&m); while(n) { num[i++]=n%m; n/=m; } for(i=i-1;i>=0;i--)

2012-12-04 00:56:49 253

原创 1042: 计算斐波那契数列

点击打开链接http://sdnuacm.sinaapp.com/problem.php?id=1042#includeusing namespace std;int main(){ int n; int fbc[50]={0,1,1,0}; for(int i=3;i<=48;i++) fbc[i]=fbc[i-1]+fbc[i-2]; cin>>n; cout<<fbc

2012-12-04 00:28:07 265

原创 1040: 收集宝藏 动态规划

http://sdnuacm.sinaapp.com/problem.php?id=1040动态规划的题型,刚开始做的时候二维数组开的太大了,造成栈溢出#includeusing namespace std;int main(){ int n,a,max=0; int arr[1005][1005]={0}; for(int i=1;i<=n;i++) { for(i

2012-12-04 00:04:11 713

原创 1034: 采药

0/1背包问题点击打开链接http://sdnuacm.sinaapp.com/problem.php?id=1034#includeusing namespace std;int main(){ int m,n,w,v; int F[1010]={0}; cin>>m>>n; for(int i=1;i<=n;i++) { cin>>w>>v; for(int k=m

2012-12-03 00:00:29 228

原创 1065: 人名查询

点击打开链接http://sdnuacm.sinaapp.com/problem.php?id=1065主要学习map的使用方法#include#include#includeusing namespace std;int main(){ map name; int n,m; cin>>n>>m; string t; for(int i=1;i<=n;i++) {

2012-12-02 23:22:35 339

原创 二维背包问题

原题地址http://sdnuacm.sinaapp.com/problemstatus.php?id=1068我们ACM周赛题#includeusing namespace std;int main(){ int m,t,n;//背包的承重与体积 int w1,w2,v;//每件药材的重量,体积,价值 int dp[105][105]={0}; cin>>m>>t>>n

2012-12-02 16:23:53 251

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除