- 博客(24)
- 收藏
- 关注
原创 HDU3714 Error Curves(2010 Asia Chengdu Regional Contest)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3714
2014-08-24 14:27:57 629
原创 UVA11237 Halloween treats (鸽巢原理)
题目链接:http://vjudge.net/vjudge/problem/viewProblem.action?id=34693
2014-08-18 20:07:50 759
转载 容斥原理讲解
算法结构目录(?)[+]翻译:vici@cust对容斥原理的描述容斥原理是一种重要的组合数学方法,可以让你求解任意大小的集合,或者计算复合事件的概率。描述 容斥原理可以描述如下: 要计算几个集合并集的大小,我们要先将所有单个集合的大小计算出来,然后减去所有两个集合相交的部分,再加回所有三个集合相交的部分,再减去所有四个集合相交的部分,
2014-08-15 19:38:52 5695
原创 HDU1695(欧拉+容斥)
GCDTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5646 Accepted Submission(s): 2045Problem DescriptionGiven 5 integers: a, b, c,
2014-08-12 20:05:18 676
原创 HDU4941Magical Forest(map)
Problem DescriptionThere is a forest can be seen as N * M grid. In this forest, there is some magical fruits, These fruits can provide a lot of energy, Each fruit has its location(Xi, Yi) and the en
2014-08-12 19:22:20 1029
原创 POJ2031 Building a Space Station(最小生成树,prim)
DescriptionYou are a member of the space station engineering team, and are assigned a task in the construction process of the station. You are expected to write a computer program to complete the ta
2014-08-09 20:48:26 683
原创 UVALive 4855 Hyper Box
DescriptionYou live in the universe X where all the physical laws and constants are different from ours. For example all of their objects areN-dimensional. The living beings of the universe X wa
2014-08-09 20:45:49 847
原创 acdream群赛(4)Bad Horse(种类并查集)
题目链接:http://acdream.info/problem?pid=1056
2014-08-09 10:08:11 1101 10
转载 大数模板(HDU4927)
#include #include #include #include #include using namespace std; #define MAXN 9999#define MAXSIZE 10#define DLEN 4class BigInt{ private: int a[500]; //可以控制大数的位数 int len;
2014-08-07 20:24:47 697
原创 HDU 4901 The Romantic Hero
Problem DescriptionThere is an old country and the king fell in love with a devil. The devil always asks the king to do some crazy things. Although the king used to be wise and beloved by his people
2014-08-07 19:23:17 690
原创 HDU4920 Matrix multiplication (CPU cache对程序的影响)
Problem DescriptionGiven two matrices A and B of size n×n, find the product of them.bobo hates big integers. So you are only asked to find the result modulo 3. InputThe input consists of
2014-08-06 20:05:00 737
原创 hdu4911 Inversion(2014年多校)
InversionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 757 Accepted Submission(s): 321Problem Descriptionbobo has a sequence
2014-08-06 14:26:12 713
转载 从头到尾彻底理解KMP
从头到尾彻底理解KMP 作者:July时间:最初写于2011年12月,2014年7月21日晚10点 全部删除重写成此文,随后的半个月从早到晚不断改进。1. 引言 本KMP原文最初写于2年多前的2011年12月,因当时初次接触KMP,思路混乱导致写也写得非常混乱,如此,留言也是“骂声”一片。所以一直想找机会重新写下KMP,但苦于一直以
2014-08-04 21:30:38 1008
原创 HDU1496HASH
Problem DescriptionConsider equations having the following form: a*x1^2+b*x2^2+c*x3^2+d*x4^2=0a, b, c, d are integers from the interval [-50,50] and any of them cannot be 0.It is consider
2014-08-04 16:33:28 794
原创 二分寻找解的个数
1.HDU1496 Equations Problem DescriptionConsider equations having the following form: a*x1^2+b*x2^2+c*x3^2+d*x4^2=0a, b, c, d are integers from the interval [-50,50] and any of them cann
2014-08-04 15:36:36 795
原创 POJ2774Long Long Message(后缀数组模板)
#include #include #include using namespace std;const int maxn = 2*100000+10; ;struct SuffixArray{ int r[maxn]; int sa[maxn],rank[maxn],height[maxn]; int t[maxn],t2[maxn],c
2014-08-03 14:57:09 734
原创 HDU4843Wow! Such Sequence!(树状数组写法)
Problem DescriptionRecently, Doge got a funny birthday present from his new friend, Protein Tiger from St. Beeze College. No, not cactuses. It's a mysterious blackbox.After some research, Doge f
2014-08-01 17:41:31 809
原创 HDU4902Nice boat (线段树区间更新+lazytag)
涉及到更新区间(成段更新)时,有一个技巧lazy_tag,在线段树子树加上tag,表示这个子树包含某些性质或者要进行某些操作,不用立即访问到这个子树的叶子,只有当下一次仍需访问这个子树下的节点时才继续进行。lazy_tag技巧可以用于下面几个方面:1、区间加一个数。(这里的加可以变为任何满足区间加法的操作,比如区间异或,区间求GCD)。2、区间变为一个数。3、区间最值。4、给出01
2014-08-01 15:22:44 789
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人