12 2014 档案

摘要:题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=214 用之前的方法会超时,看了网上的大神的做法,要用到二分法,二分插入法 代码: #include<stdio.h> #include<string.h> #define min -9999 阅读全文
posted @ 2014-12-21 11:58 wojiaohuangyu 阅读(4) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=49 代码: #include<stdio.h> #include<string.h> #define max(a,b) a>b?a:b int main(){ int du[230],val 阅读全文
posted @ 2014-12-21 09:37 wojiaohuangyu 阅读(3) 评论(0) 推荐(0) 编辑
摘要:题目链接: hdu 1513:http://acm.hdu.edu.cn/showproblem.php?pid=1513 nyoj 37:http://acm.nyist.net/JudgeOnline/problem.php?pid=37 nyoj 36:http://acm.nyist.net 阅读全文
posted @ 2014-12-20 20:32 wojiaohuangyu 阅读(3) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=171 动态规划 代码: #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; int m 阅读全文
posted @ 2014-12-18 22:19 wojiaohuangyu 阅读(3) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=17 跟做的上一道题目几乎一样,关键地方的代码改一下就行了 代码: #include<stdio.h> #include<string.h> #include<algorithm> using 阅读全文
posted @ 2014-12-18 21:51 wojiaohuangyu 阅读(3) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=79 代码: #include<stdio.h> #include<string.h> int main(){ int dp[30],num[30]; int ans,temp,i,j,k,t 阅读全文
posted @ 2014-12-18 21:21 wojiaohuangyu 阅读(3) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=76 斐波那数列 代码: #include<stdio.h> #include<string.h> int main(){ int num[45]; int n,m; int i,j,k,t; 阅读全文
posted @ 2014-12-17 21:19 wojiaohuangyu 阅读(3) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=456 0-1背包问题,现在发现我对0-1背包问题有点理解了 我的代码: #include<stdio.h> #include<string.h> #include<algorithm> us 阅读全文
posted @ 2014-12-16 23:22 wojiaohuangyu 阅读(3) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=289 0-1背包水过~~ 我的代码: #include<stdio.h> #include<string.h> #include<algorithm> using namespace std 阅读全文
posted @ 2014-12-16 18:59 wojiaohuangyu 阅读(2) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=325 本道题目使用的是0-1背包,不过貌似用0-1背包效果不怎么好,参考别人的代码险过~ 我的代码: #include<stdio.h> #include<string.h> #includ 阅读全文
posted @ 2014-12-16 18:56 wojiaohuangyu 阅读(4) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=269 其实使用0-1背包不怎么熟练,看完这个讲解后才算是对这道题目理解了: http://blog.csdn.net/u013050857/article/details/38373119 阅读全文
posted @ 2014-12-16 18:50 wojiaohuangyu 阅读(4) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=252 简单水题 代码: #include<stdio.h> #include<string.h> int main(){ int n,t; int num[120]; memset(num, 阅读全文
posted @ 2014-12-16 18:48 wojiaohuangyu 阅读(3) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=219 #include<stdio.h> #include<string.h> int main(){ int year,month,day; while(~scanf("%d %d %d" 阅读全文
posted @ 2014-12-14 22:39 wojiaohuangyu 阅读(4) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1874 弗洛伊德最短路径问题 代码: #include<stdio.h> #include<string.h> #define inf 0x3f3f3f3f #include<algorithm> usi 阅读全文
posted @ 2014-12-13 22:28 wojiaohuangyu 阅读(2) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=27 代码: <pre name="code" class="cpp">#include<stdio.h> #include<string.h> #include<stdlib.h> int 阅读全文
posted @ 2014-12-12 19:00 wojiaohuangyu 阅读(4) 评论(0) 推荐(0) 编辑
摘要:题目链接: 搜索题,有两种情况,两种有一种不考虑的话就会WA.... 代码: #include<stdio.h> #include<string.h> #define INF 999999999//定义一个最大的数 #include<algorithm> using namespace std; i 阅读全文
posted @ 2014-12-09 21:09 wojiaohuangyu 阅读(4) 评论(0) 推荐(0) 编辑
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1015 #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; char zifu[2000],str[20],s 阅读全文
posted @ 2014-12-08 22:47 wojiaohuangyu 阅读(5) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://poj.org/problem?id=1338 丑数 #include<stdio.h> #include<string.h> int main(){ int i,j,k,t; int num[1510]; memset(num,0,sizeof(num)); int q2, 阅读全文
posted @ 2014-12-04 13:16 wojiaohuangyu 阅读(3) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示