11 2013 档案

poj2886
摘要:Who Gets the Most Candies?Time Limit: 5000MSMemory Limit: 131072KTotal Submissions: 8527Accepted: 2581Case Time Limit: 2000MSDescriptionN children are sitting in a circle to play a game.The children are numbered from 1 to N in clockwise order. Each of them has a card with a non-zero integer on it in 阅读全文

posted @ 2013-11-30 13:51 jec 阅读(363) 评论(0) 推荐(0) 编辑

关系
摘要:1.1序偶及有序n元组 有两个元素x和y按一定得次序排列组成的有序序列称为序偶或有序对,记作(与集合{x,y}不同);1.2笛卡尔积 设A和B为集合,称集合{|a属于AΛb属于B}为A和B的笛卡尔积,记作AxB。当A=B时,记为A2。 Ax(BυC)=(AxB)υ(AxC) Ax(B∩C)=(AxB)∩(AxC)2.1关系 任一序偶的集合确定了一个二元关系R,R中的任一序偶可记作属于R或aRb。不在R中的任一序偶可记作不属于R或aR非b。若aRb,我们说a和 b具有关系R 令R为二元关系,DR={x|至少存在一个y使得(xRy)}为定义域,RR={y|至少存在一个x使得(xRy)... 阅读全文

posted @ 2013-11-30 13:35 jec 阅读(629) 评论(0) 推荐(0) 编辑

poj2828(Buy Tickets)线段树
摘要:Buy TicketsTime Limit: 4000MSMemory Limit: 65536KTotal Submissions: 11157Accepted: 5450DescriptionRailway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue…The Lunar New Year was approaching, but unluckily the Little Cat still had schedul 阅读全文

posted @ 2013-11-28 17:53 jec 阅读(178) 评论(0) 推荐(0) 编辑

hdu2795(Billboard)线段树
摘要:BillboardTime Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 8266 Accepted Submission(s): 3676 Problem DescriptionAt the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The board is 阅读全文

posted @ 2013-11-28 09:19 jec 阅读(226) 评论(0) 推荐(0) 编辑

hdu1394(Minimum Inversion Number)线段树
摘要:明知道是线段树,却写不出来,搞了半天,戳,没办法,最后还是得去看题解(有待于提高啊啊),想做道题还是难啊。还是先贴题吧HDU-1394 Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8324Accepted Submission(s): 5115Problem DescriptionThe inversion number of a given number sequence a1, a2, . 阅读全文

posted @ 2013-11-27 23:05 jec 阅读(203) 评论(0) 推荐(0) 编辑

hdu4407Sum(容斥原理)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=4407Sum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s)... 阅读全文

posted @ 2013-11-26 20:06 jec 阅读(275) 评论(0) 推荐(0) 编辑

树的重心
摘要:看了网上大牛们求重心的方法,自己也写写。假设x结点是树的重心,那么现在删除一个树的结点,就可以得到一些子树,那么得到的子树中结点个数最大的数要最小就是树的重心。(有点啰嗦)root = min(max(son(x)))枚举树的每个结点,计算以每个结点为根的对应的各个子树的结点的最大值,然后再取一个最... 阅读全文

posted @ 2013-11-23 14:01 jec 阅读(312) 评论(0) 推荐(0) 编辑

匈牙利算法
摘要:匈牙利算法本文参考了大牛博客:https://www.byvoid.com/blog/hungary/设G=(V,E)是一个无向图。如顶点集V可分割为两个互不相交的子集V1,V2之选择这样的子集中边数最大的子集称为图的最大匹配问题(maximal matching problem)如果一个匹配中,|... 阅读全文

posted @ 2013-11-12 22:05 jec 阅读(328) 评论(0) 推荐(0) 编辑

快速排列组合
摘要:组合数c(n, m) = n! / (m!.(n - m)!),n! = elnn! = e(ln1 + ln2 + ... + lnn)则c(n, m) = e(ln1 + ln2 + ... + lnn) / (e(ln1 + ln2 + ... + lnm).e(ln1 + ln2 + ...... 阅读全文

posted @ 2013-11-11 13:16 jec 阅读(361) 评论(0) 推荐(0) 编辑

最大公约数和最小公倍数
只有注册用户登录后才能阅读该文。

posted @ 2013-11-11 12:26 jec 阅读(4) 评论(0) 推荐(0) 编辑

导航

点击右上角即可分享
微信分享提示