上一页 1 ··· 3 4 5 6 7
摘要: 类似的题目有HDU1058 humble number(翻译下来都是丑陋的数字)。 Description Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequ... 阅读全文
posted @ 2015-01-03 17:56 MrYu4 阅读(46) 评论(0) 推荐(0)
摘要: Problem Description Given a number N, you are asked to count the number of integers between A and B inclusive which are relati... 阅读全文
posted @ 2015-01-01 13:59 MrYu4 阅读(44) 评论(0) 推荐(0)
摘要: Description 73 88 1 02 7 4 44 5 2 6 5(Figure 1) Figure 1 shows a number triangle. Write a program that ... 阅读全文
posted @ 2014-12-21 14:24 MrYu4 阅读(36) 评论(0) 推荐(0)
摘要: Problem Description There are n people standing in a line. Each of them has a unique id number. Now the Ragnarok is coming.... 阅读全文
posted @ 2014-12-20 17:13 MrYu4 阅读(19) 评论(0) 推荐(0)
摘要: 在大神的网站进不去的时候可以过来看看,另外道客巴巴有个排版比较好的文档,外观派可以去看看http://www.doc88.com/p-2728103209174.html 很早前写的那篇线段树专辑至今一直是本博客阅读点击量最大的一片文章,当时觉得挺自豪的,还... 阅读全文
posted @ 2014-07-26 23:29 MrYu4 阅读(75) 评论(0) 推荐(0)
摘要: 什么都不说了,贴代码,理解的时候画个树来理解理解就好了,这个也是典型的牺牲空间复杂度来缩短时间复杂度的典型算法。。。。 还是附点图上来吧。。。。。鼠标画的,见谅 #include#include#include#include#define maxn 2000... 阅读全文
posted @ 2014-07-16 16:42 MrYu4 阅读(28) 评论(0) 推荐(0)
摘要: DFS就是深度搜索算法。。。。感觉就像破案一样。。。。 #include#include#include#define maxn 10using namespace std;char map[maxn][maxn];int mat[maxn][maxn];in... 阅读全文
posted @ 2014-05-27 20:19 MrYu4 阅读(26) 评论(0) 推荐(0)
摘要: http://codeforces.com/contest/426/problem/B 题意大概就是对称有关,要注意的是,当行数为奇数的时候,答案就是行数本身 #include#include#include#include#define maxn 1005u... 阅读全文
posted @ 2014-04-28 08:16 MrYu4 阅读(23) 评论(0) 推荐(0)
摘要: RT,我就不解释了,题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2602。 初学01背包的人可以做做#include#include#include#include#define maxn 1005using n... 阅读全文
posted @ 2014-04-27 21:37 MrYu4 阅读(18) 评论(0) 推荐(0)
摘要: 快速排序 #include int a[101],n;//定义全局变量,这两个变量需要在子函数中使用void quicksort(int left,int right){ int i,j,t,temp; if(left>right) ... 阅读全文
posted @ 2014-04-27 18:27 MrYu4 阅读(28) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7