- 博客(8)
- 问答 (1)
- 收藏
- 关注
原创 poj2528 Mayor's posters
题目链接:http://poj.org/problem?id=2528 题目大意:往一面很长的墙上贴海报,最后能看到几张。也就是往这面墙上涂颜色,最后可见多少种不同的颜色。 线段树+离散化。 #include #include #include using namespace std; int t,n,p,count,i; int col[10000010],ans[10
2012-07-29 10:06:55 1032
原创 hdu 1247 Hat's words
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1247 /* 对每一个单词进行暴力查找.....*/ #include #include #include using namespace std; #define M 1000000 char s[50100][20]; struct { int next[26];
2012-07-28 09:25:14 1102
原创 hdu1016 Prime Ring Problem
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1016 DFS #include #include int a[25],prime[1600],vis[40],n; void enen()//标记素数 { int i,j; memset(prime,0,sizeof(prime)); for(i
2012-07-27 16:37:37 589
原创 poj 2777 count color
题目链接:http://poj.org/problem?id=2777 /* 线段树成段更新,root[t].lazy表示颜色编号,但因为是求每段的颜色种类,所以往下传递的时候,是root[t*2+1].lazy=root[t*2].lazy=root[t].lazy. 因为题目中限定了颜色的种类为1~30,所以可以用t[i]来表示i颜色是否出现过。 */ #include
2012-07-27 09:16:26 736
原创 poj 2299 Ultra-QuickSort
题目地址:http://poj.org/problem?id=2299 树状数组+离散化; 注意要__int64,当时用的Int,结果WA了,后来看到a[i]的范围,就很傻逼的全改成__int64了 求逆序数: 原序列:9 1 0 5 4 离散化(d[i]):5 2 1 4 3 getsum(i):1~i有多少个1,换言之,这个也表示到目前为止,已经有多少比我小的数
2012-07-26 10:32:28 643
原创 HDU 2087 剪花布条
剪花布条 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4476 Accepted Submission(s): 3008 Problem Description 一块花布条,里面有些图案,另有一块直接可用
2012-07-25 14:46:23 3071 1
原创 hdu 2571 命运
命运 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4196 Accepted Submission(s): 1483 Problem Description 穿过幽谷意味着离大魔王lemon已经无限接近了
2012-07-23 00:21:41 1610 3
原创 HDU 2546 饭卡
【Hot】关于PAT/ACM培训的报名通知~ 饭卡 Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3496 Accepted Submission(s): 1121 Problem Desc
2012-07-22 23:28:31 1309
空空如也
求教,hadoop-2.2.0升级hadoop-2.6.0。
2015-09-06
TA创建的收藏夹 TA关注的收藏夹
TA关注的人