上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 51 下一页
摘要: 刚刚交了1506,无意间瞟到左边的随笔数,发现已经401题了,这么说前几天就400题了啊囧。昨天还想交到400题就先放放,背单词的,没想到那么快。等把USACO那个八皇后写完吧。人生总是有许多不想做又不得不做的事情。。。还记得刚接触acm的时候,听说题量300题是铜,400题是银,500题是金。当时觉得,我靠这么多,不至于吧。。。现在看来这个数还少了,而且还要看ac的是水题还是难题,这个差距还蛮大的。 阅读全文
posted @ 2012-02-26 06:59 Seraph2012 阅读(179) 评论(3) 推荐(1)
摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=1506题意:给一些连续的直方柱的高(宽是1),找一个面积最大的矩形。mark:本来是个单调队列题,但是dp好像可以解。考虑每个柱往两边找能扩展到的最远的边界,乘上自己的高可获得。往两边扩展边界的时候理论复杂度是O(n),直接做是要TLE的。先考虑往右找边界,假设之前右边所有的直方柱的边界已经被找过,并且被记录下来,假如下一个柱的高度比自己高,则直接可以跳到下一个柱的边界继续找,不断迭代后很快就能找到边界。不知道这种迭代的方法复杂度如何证明,对于每个柱子,最坏的肯定是要找n次(递减),但是最坏的情况不可能 阅读全文
posted @ 2012-02-26 06:55 Seraph2012 阅读(659) 评论(0) 推荐(0)
摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=2552题意:中文。。。mark:无论输入是多少。。。输出都是1。代码:# include <stdio.h>int main (){ int T ; scanf ("%d", &T) ; while (T--) puts("1") ; return 0 ;} 阅读全文
posted @ 2012-02-19 08:29 Seraph2012 阅读(181) 评论(0) 推荐(0)
摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=2551题意:中文,直接循环可搞。代码:# include <stdio.h>long long calc(long long x){ long long i, sum = 0 ; for (i = 1 ; ; i++) { sum += i*i*i ; if (sum >= x) break ; } return i ;}int main (){ int T, x ; scanf ("%d", &T) ; while (T--)... 阅读全文
posted @ 2012-02-19 08:16 Seraph2012 阅读(308) 评论(0) 推荐(0)
摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=2550题意:中文。mark:2wa,没看清题意,还要按箭身长度排序,囧。代码:# include <stdio.h># include <stdlib.h>typedef struct NODE{ int a, b ;}NODE ;NODE num[100] ;int cmp(const void *a, const void *b){ NODE *p = (NODE*)a, *q = (NODE*)b ; return p->a - q->a ;}void outp 阅读全文
posted @ 2012-02-19 08:12 Seraph2012 阅读(173) 评论(0) 推荐(0)
摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=2549题意:中文。mark:水题不解释。代码:# include <stdio.h># include <string.h>int main (){ int T ; int a, n, len ; char str[10] ; scanf ("%d", &T) ; while (T--) { scanf ("%d.%s %d", &a, str, &n) ; len = strlen(str) ; if (n < 阅读全文
posted @ 2012-02-19 07:55 Seraph2012 阅读(250) 评论(9) 推荐(0)
摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=2548题意:中文。mark:著名的ooxx题。。。不解释。代码:# include <stdio.h># include <math.h>int main (){ int T ; double a, b, c, d ; scanf ("%d", &T) ; while (T--) { scanf ("%lf%lf%lf%lf", &a, &b, &c, &d) ; printf ("%.3l 阅读全文
posted @ 2012-02-19 07:51 Seraph2012 阅读(142) 评论(0) 推荐(0)
摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=2547题意:中文。mark:其实就是求两点间距离,水。注意输入数据是实数。代码:# include <stdio.h># include <math.h>int main (){ int T ; double a, b, c, d ; scanf ("%d", &T) ; while (T--) { scanf ("%lf%lf%lf%lf", &a, &b, &c, &d) ; printf (&q 阅读全文
posted @ 2012-02-19 07:49 Seraph2012 阅读(209) 评论(0) 推荐(0)
摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=1722题意:中文。mark:公式,p+q-gcd(p,q)。证明不懂。。。见大牛博客。http://blog.sina.com.cn/s/blog_696187fd0100soe2.html代码:# include <stdio.h>int gcd(int p, int q){return p%q?gcd(q,p%q):q;}int main (){ int p, q ; while (~scanf ("%d%d", &p, &q)) printf (&q 阅读全文
posted @ 2012-02-19 07:45 Seraph2012 阅读(173) 评论(0) 推荐(0)
摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=1323题意:某数的真因子加起来比它大叫做ABUNDANT,比它小叫做DEFICIENT,相等叫做PERFECT。输入一个数,输出它是哪种情况。直接暴。代码:# include <stdio.h>int main (){ int n, ans, i ; puts ("PERFECTION OUTPUT") ; while (~scanf ("%d", &n),n) { for(i = 1,ans=0 ; i < n && a 阅读全文
posted @ 2012-02-16 10:27 Seraph2012 阅读(155) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 51 下一页