摘要: jquery实现"跳到底部","回到顶部"效果(类似锚) 跳到底部 返 回 顶 部 阅读全文
posted @ 2016-03-05 22:26 hahazai 阅读(502) 评论(0) 推荐(0) 编辑
摘要: 图像的影像地图超链接,<map>标签浅谈 在HTML中还可以把图片划分成多个热点区域,每一个热点域链接到不同网页的资源。这种效果的实质是把一幅图片划分为不同的热点区域,再让不同的区域进行超链接。这就是影像地图。要完成地图区域超链接要用到三种标签:<img><map><area>下面分别介绍这些标签的 阅读全文
posted @ 2016-03-02 16:50 hahazai 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 1 //孪生素数 2 #include 3 #include 4 #include 5 #include 6 int is_prime(int x) 7 { 8 int i,m; 9 assert(x>=0); //当x>=0不成立时程序终止 10 if(x==1) return 0; 11 m=floor(sqrt(x)+0.5); //四... 阅读全文
posted @ 2016-01-18 21:05 hahazai 阅读(135) 评论(0) 推荐(0) 编辑
摘要: //最长回文子串 #include #include #include #include #include #define MAX 5005 char buf[MAX],s[MAX]; int p[MAX]; int main() { while(gets(buf)) { int n,m=0,max1=0; int i,j,x,y; ... 阅读全文
posted @ 2016-01-16 14:01 hahazai 阅读(162) 评论(0) 推荐(0) 编辑
摘要: //倒三角形 #include #include int main() { int i,j,n; while(~scanf("%d",&n)) { for(i=n;i>=1;i--) { for(j=1;j #include #include #include #define MAX 10 int a[... 阅读全文
posted @ 2016-01-14 19:51 hahazai 阅读(424) 评论(0) 推荐(0) 编辑
摘要: Problem Description The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates ... 阅读全文
posted @ 2015-02-15 15:31 hahazai 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Description: Alice准备在森林里面建一栋小木屋,现在他有一根长度为n的木块,需要把它们切割成m根长度分别为l1,l2,...,lm的更小的木块( sigma(li) = n )。而Alice每次只能将之前的某一块切成两块,每次切割木块会消耗Alice的体力,消耗的体力值为当前待切割的 阅读全文
posted @ 2015-02-01 22:04 hahazai 阅读(178) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2015-01-31 14:59 hahazai 阅读(4) 评论(0) 推荐(0) 编辑
摘要: Problem Description 有一个长度为n(n<=100)的数列,该数列定义为从2开始的递增有序偶数,现在要求你按照顺序每m个数求出一个平均值,如果最后不足m个,则以实际数量求平均值。编程输出该平均值序列。 Input 输入数据有多组,每组占一行,包含两个正整数n和m,n和m的含义如上所 阅读全文
posted @ 2015-01-31 12:41 hahazai 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Description: 部分背包问题是这样一个问题: 给定n种物品和一个背包。物品i的重量是Wi,其价值为Vi,背包的容量为C。应如何选择装入背包的物品, 使得装入背包中物品的总价值最大? 选择物品i装入背包时,可以选择物品i的一部分,而不一定要全部装入背包,1≤i≤n。 例如:背包容量为5,有3 阅读全文
posted @ 2015-01-30 22:39 hahazai 阅读(186) 评论(0) 推荐(0) 编辑