随笔分类 -  ACM(ZOJ)

1 2 下一页

ZOJ 3209 Treasure Map (Dancing Links)
摘要:Treasure MapTime Limit:2 Seconds Memory Limit:32768 KBYour boss once had got many copies of a treasure map. Unfortunately, all the copies are now brok... 阅读全文

posted @ 2014-05-26 22:14 kuangbin 阅读(2349) 评论(0) 推荐(0)

ZOJ 3765 Lights (伸展树splay)
摘要:题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3765LightsTime Limit:8 Seconds Memory Limit:131072 KBNow you haveNlights in a line. Don't worry - the lights don't have color. The only status they have is on and off. And, each light has a value, too.There is a boring student 阅读全文

posted @ 2014-03-02 21:44 kuangbin 阅读(1752) 评论(0) 推荐(0)

ZOJ 2112 Dynamic Rankings (动态第k大,树状数组套主席树)
摘要:Dynamic RankingsTime Limit:10 Seconds Memory Limit:32768 KBThe Company Dynamic Rankings has developed a new kind of computer that is no longer satisfied with the query like to simply find the k-th smallest number of the given N numbers. They have developed a more powerful system such that for N numb 阅读全文

posted @ 2013-09-08 10:32 kuangbin 阅读(6473) 评论(0) 推荐(2)

ZOJ 3494 BCD Code(AC自动机+数位DP)
摘要:BCD CodeTime Limit:5 Seconds Memory Limit:65536 KBBinary-coded decimal (BCD) is an encoding for decimal numbers in which each digit is represented by its own binary sequence. To encode a decimal number using the common BCD encoding, each decimal digit is stored in a 4-bit nibble:Decimal: 0 1 ... 阅读全文

posted @ 2013-06-30 22:29 kuangbin 阅读(2519) 评论(0) 推荐(0)

ZOJ 4114 Detect the Virus(AC自动机)
摘要:Detect the VirusTime Limit:2 Seconds Memory Limit:65536 KBOne day, Nobita found that his computer is extremely slow. After several hours' work, he finally found that it was a virus that made his poor computer slow and the virus was activated by a misoperation of opening an attachment of an email 阅读全文

posted @ 2013-06-27 15:23 kuangbin 阅读(967) 评论(0) 推荐(0)

HDU 3709 Balanced Number ZOJ 3416 Balanced Number(数位DP)
摘要:Balanced NumberTime Limit:5 Seconds Memory Limit:65536 KBA balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specifically, imagine each digit as a box with weight indicated by the digit. When a pivot is placed at some digit of the number, the dis 阅读全文

posted @ 2013-05-01 10:52 kuangbin 阅读(786) 评论(0) 推荐(0)

ZOJ 3469 Food Delivery(区间DP)
摘要:题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4255DP的思路就是,如果要访问完[i,j],那么它的子区间一定访问完了。用dp[i][j][0]表示访问完区间[i,j]并留在左端点,dp[i][j][1]表示访问完区间[i,j]并留在右端点。把饭店那个地方也加进去作为点。从饭店那个点往两边进行DP;dp[i][j][0] 可以根据dp[i+1][j][0]和dp[i+1][j][1]得到。dp[i][j][1] 可以根据dp[i][j-1][0]和dp[i][j-1][1]得到。//============== 阅读全文

posted @ 2013-04-30 14:59 kuangbin 阅读(1598) 评论(0) 推荐(0)

ZOJ 3735 Cake(区间DP,最优三角剖分)
摘要:题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4472开始做下区间DP的题目了。题解可以参照大牛博客:http://blog.csdn.net/woshi250hua/article/details/7824433这题很经典,主要是思路:两种写法写的,一种是DP,一种是记忆化搜索。DP一定要注意循环的顺序。代码一://============================================================================// Name : ZOJ.cp... 阅读全文

posted @ 2013-04-29 10:45 kuangbin 阅读(1248) 评论(0) 推荐(0)

ZOJ 4257 Most Powerful (状态压缩DP)
摘要:Most PowerfulTime Limit:2 Seconds Memory Limit:65536 KBRecently, researchers on Mars have discovered N powerful atoms. All of them are different. These atoms have some properties. When two of these atoms collide, one of them disappears and a lot of power is produced. Researchers know the way every t 阅读全文

posted @ 2013-04-26 22:33 kuangbin 阅读(450) 评论(0) 推荐(0)

ZOJ 3261 Connections in Galaxy War (并查集)
摘要:Connections in Galaxy WarTime Limit:3 Seconds Memory Limit:32768 KBIn order to strengthen the defense ability, many stars in galaxy allied together and built many bidirectional tunnels to exchange messages. However, when the Galaxy War began, some tunnels were destroyed by the monsters from another 阅读全文

posted @ 2013-04-05 19:52 kuangbin 阅读(1660) 评论(2) 推荐(1)

狗狗40题
摘要:决定先把ZOJ上的狗狗40题刷掉了呢~~~~~IDZOJ IDTitleRatio (AC/All)10011021The Willy Memorial Program23.69% (82/346)10021030Farmland50.33% (151/300)10031041Transmitters49.30% (995/2018)10041043Split Windows52.48% (74/141)10051060Sorting It All Out29.89% (993/3322)10061063Space Station Shielding31.79% (235/739)100710 阅读全文

posted @ 2012-12-12 14:23 kuangbin 阅读(1854) 评论(3) 推荐(0)

ZOJ 3664 Split the Rectangle 第37届ACM/ICPC长春赛区现场赛 J 题(模拟建树,暴力 求LCA)
摘要:Split the RectangleTime Limit: 2 Seconds Memory Limit: 32768 KBAlice comes up with a new game and wants to play with Bob.There is one rectangle on the paper initially, we define its lower-left corner's coordinate is (xL, yL) and upper-right corner's coordinate is (xR, yR).Bob has executed th 阅读全文

posted @ 2012-10-19 13:54 kuangbin 阅读(1108) 评论(0) 推荐(0)

ZOJ 3662 Math Magic 第37届ACM/ICPC长春赛区H题(DP)
摘要:Math MagicTime Limit: 3 Seconds Memory Limit: 32768 KBYesterday, my teacher taught us about math: +, -, *, /, GCD, LCM... As you know, LCM (Least common multiple) of two positive numbers can be solved easily because of a * b = GCD (a, b) * LCM (a, b).In class, I raised a new idea: "how to calcu 阅读全文

posted @ 2012-10-17 13:35 kuangbin 阅读(1415) 评论(0) 推荐(0)

ZOJ 3659 Conquer a New Region 第37届ACM/ICPC 长春赛区现场赛E题 (并查集)
摘要:Conquer a New RegionTime Limit: 5 Seconds Memory Limit: 32768 KBThe wheel of the history rolling forward, our king conquered a new region in a distant continent.There are N towns (numbered from 1 to N) in this region connected by several roads. It's confirmed that there is exact one route betwee 阅读全文

posted @ 2012-10-17 08:54 kuangbin 阅读(1337) 评论(0) 推荐(0)

ZOJ 3665 Yukari's Birthday 第37届ACM/ICPC长春赛区现场赛K题 (水题,枚举,二分)
摘要:Yukari's BirthdayTime Limit: 2 Seconds Memory Limit: 32768 KBToday is Yukari's n-th birthday. Ran and Chen hold a celebration party for her. Now comes the most important part, birthday cake! But it's a big challenge for them to place n candles on the top of the cake. As Yukari has lived 阅读全文

posted @ 2012-10-16 12:29 kuangbin 阅读(1620) 评论(7) 推荐(0)

ZOJ 3657 The Little Girl who Picks Mushrooms 第37届ACM/ICPC长春赛区现场赛C题(水题)
摘要:The Little Girl who Picks MushroomsTime Limit: 2 Seconds Memory Limit: 32768 KBIt's yet another festival season in Gensokyo. Little girl Alice planned to pick mushrooms in five mountains. She brought five bags with her and used different bags to collect mushrooms from different mountains. Each b 阅读全文

posted @ 2012-10-16 11:07 kuangbin 阅读(1392) 评论(2) 推荐(0)

ZOJ 3656 Bit Magic 第37届ACM/ICPC长春赛区现场赛B题 (2-SAT)
摘要:Bit MagicTime Limit: 8 Seconds Memory Limit: 32768 KBYesterday, my teacher taught me about bit operators: and (&), or (|), xor (^). I generated a number table a[N], and wrote a program to calculate the matrix table b[N][N] using three kinds of bit operator. I thought my achievement would get tea 阅读全文

posted @ 2012-10-16 10:50 kuangbin 阅读(1706) 评论(7) 推荐(0)

ZOJ 3604 Help Me Escape(期望DP)
摘要:Help Me EscapeTime Limit: 2 Seconds Memory Limit: 32768 KBBackgroundIf thou doest well, shalt thou not be accepted? and if thou doest not well, sin lieth at the door. And unto thee shall be his desire, and thou shalt rule over him. And Cain talked with Abel his brother: and it came to pass, when th. 阅读全文

posted @ 2012-10-06 15:49 kuangbin 阅读(1651) 评论(0) 推荐(0)

ZOJ 3380 Patchouli's Spell Cards(概率DP)
摘要:Patchouli's Spell CardsTime Limit: 7 Seconds Memory Limit: 65536 KBPatchouli Knowledge, the unmoving great library, is a magician who has settled down in the Scarlet Devil Mansion (紅魔館). Her specialty is elemental magic employing the seven elements fire, water, wood, metal, earth, sun, and moon. 阅读全文

posted @ 2012-10-06 14:57 kuangbin 阅读(1611) 评论(0) 推荐(0)

ZOJ 3460 Missile(二分+二分匹配)
摘要:MissileTime Limit: 2 Seconds Memory Limit: 65536 KBYou control N missile launching towers. Every tower has enough missiles, but for each tower only one missile can be launch at the same time. Before the launching, every missile need T1 seconds to leave the tower. Assume that all the missiles have t. 阅读全文

posted @ 2012-10-05 00:00 kuangbin 阅读(562) 评论(0) 推荐(1)

1 2 下一页

导航

JAVASCRIPT: