acm之路--数据结构
文章平均质量分 82
synapse7
这个作者很懒,什么都没留下…
展开
-
基于链表实现的珂朵莉树
以下内容基于 CF896C Willem, Chtholly and Seniorious 来介绍。珂朵莉树实质上是一种可以维护区间上的分裂与合并的数据结构,但要求数据是随机的,或者有大量的随机合并操作,这样才能保证维护的区间个数是一个很小的值。一开始,我们用不同的节点表示 [1,1],[2,2],...,[n,n][1,1],[2,2],...,[n,n][1,1],[2,2],...,[n...原创 2019-10-29 22:18:17 · 712 阅读 · 1 评论 -
POJ 3067 Japan(树状数组求逆序对)
Japanhttp://poj.org/problem?id=3067Time Limit: 1000MSMemory Limit: 65536KDescriptionJapan plans to welcome the ACM ICPC World Finals and a lot of roads must b原创 2013-07-27 12:48:48 · 1433 阅读 · 0 评论 -
POJ 3253 Fence Repair(优先队列&哈夫曼树)
Fence Repairhttp://poj.org/problem?id=3253Time Limit: 2000MSMemory Limit: 65536KDescriptionFarmer John wants to repair a small length of the fence around the pasture. He me原创 2013-08-01 15:03:57 · 1251 阅读 · 0 评论 -
POJ 3629 Card Stacking(队列,两种方法)
Card Stackinghttp://poj.org/problem?id=3629Time Limit: 1000MSMemory Limit: 65536KDescriptionBessie is playing a card game with her N-1 (2 ≤ N ≤ 100) cow friends using a d原创 2013-08-01 10:42:03 · 3408 阅读 · 10 评论 -
UVa 10050 Hartals(优先队列)
10050 - HartalsTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=103&page=show_problem&problem=991A social research organization has dete原创 2013-08-02 23:05:09 · 1293 阅读 · 0 评论 -
UVa 11054/HDU 1489/POJ 2940 Wine trading in Gergovia(贪心&双向队列)
11054 - Wine trading in GergoviaTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=113&page=show_problem&problem=1995As you may know from原创 2013-08-05 11:34:57 · 1531 阅读 · 0 评论 -
Codeforces Beta Round #70 (Div. 2) / 78A Haiku (字符串处理)
A. Haikuhttp://codeforces.com/problemset/problem/78/Atime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputH原创 2013-08-22 09:05:53 · 1094 阅读 · 0 评论 -
HDU 4608 I-number (数学&字符串处理)
I-numberhttp://acm.hdu.edu.cn/showproblem.php?pid=4608Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionThe I-numbe原创 2013-08-22 18:05:05 · 910 阅读 · 0 评论 -
Codeforces Beta Round #65 (Div. 2) / 71A Way Too Long Words(字符串操作)
A. Way Too Long Wordshttp://codeforces.com/problemset/problem/71/Atime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard ou原创 2013-08-21 11:35:41 · 1110 阅读 · 0 评论 -
Codeforces Beta Round #89 (Div. 2) / 118A String Task(字符串操作)
A. String Taskhttp://codeforces.com/problemset/problem/118/Atime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output原创 2013-08-21 15:26:34 · 1159 阅读 · 0 评论 -
Codeforces Round #163 (Div. 2) / 226A Stones on the Table (字符串处理)
A. Stones on the Tablehttp://codeforces.com/problemset/problem/266/Atime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard原创 2013-08-23 15:38:20 · 1117 阅读 · 0 评论 -
Codeforces Round #173 (Div. 2) / 282C XOR and OR (字符串处理)
C. XOR and ORhttp://codeforces.com/problemset/problem/282/Ctime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output原创 2013-08-22 23:40:51 · 1489 阅读 · 0 评论 -
HDU 1022 Train Problem I (栈)
Train Problem Ihttp://acm.hdu.edu.cn/showproblem.php?pid=1022Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionAs the原创 2013-08-25 17:07:57 · 1038 阅读 · 0 评论 -
Codeforces Round #186 (Div. 2) / 313B Ilya and Queries (字符串处理)
B. Ilya and Queriestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIlya the Lion wants to help all his fri原创 2013-08-29 10:01:41 · 1689 阅读 · 0 评论 -
Codeforces VK Cup 2012 Qualification Round 1 /158C (字符串处理)
C. Cd and pwd commandshttp://codeforces.com/problemset/problem/158/Ctime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard原创 2013-08-28 23:36:53 · 954 阅读 · 0 评论 -
POJ 2271 HTML (字符串处理)
HTMLhttp://poj.org/problem?id=2271Time Limit: 1000MSMemory Limit: 65536KDescriptionIf you ever tried to read a html document on a Macintosh, you know how hard it is if no N原创 2013-08-29 19:29:50 · 1039 阅读 · 0 评论 -
UVa 1513 / UVALive 5902 Movie collection (树状数组)
5902 - Movie collectionTime limit: 3.000 secondshttps://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=3913Mr. K. I. has a very big原创 2013-08-31 21:01:44 · 2074 阅读 · 0 评论 -
URAL 1915 Titan Ruins: Reconstruction of Bygones (栈)
1915. Titan Ruins: Reconstruction of BygonesTime limit: 1.0 secondMemory limit: 64 MB`It seems that we're in a trap,' said Soren.`A very familiar phrase,' Alba replied.The friend原创 2013-08-31 14:09:18 · 987 阅读 · 0 评论 -
Seoul 2006 / UVa 1368 DNA Consensus String (字符串处理)
1368 - DNA Consensus StringTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=457&page=show_problem&problem=4114 Figure 1.DNA (Deoxyribo原创 2013-09-02 10:20:00 · 968 阅读 · 0 评论 -
POJ 1068 Parencodings (字符串处理)
Parencodingshttp://poj.org/problem?id=1068Time Limit: 1000MSMemory Limit: 10000KDescriptionLet S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in t原创 2013-08-28 21:32:11 · 838 阅读 · 0 评论 -
UVa 494 Kindergarten Counting Game (字符串处理)
494 - Kindergarten Counting GameTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=show_problem&problem=435Everybody sit down in a原创 2013-09-13 12:02:37 · 1039 阅读 · 0 评论 -
UVa 458 The Decoder (最简代码!)
458 - The DecoderTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=show_problem&problem=399Write a complete program that will cor原创 2013-09-13 11:29:39 · 1411 阅读 · 0 评论 -
UVa 489 Hangman Judge (模拟&字符串匹配)
489 - Hangman JudgeTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=show_problem&problem=430In ``Hangman Judge,'' you are to wri原创 2013-09-13 23:54:10 · 1019 阅读 · 0 评论 -
UVa 112 Tree Summing (scanf()去空格&递归&二叉树遍历)
112 - Tree SummingTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=48BackgroundLISP was one of the earliest high-le原创 2013-10-04 12:49:06 · 1467 阅读 · 0 评论 -
UVa 10082 WERTYU (water ver.)
10082 - WERTYUTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=1023A common typing error is to place the ha原创 2013-09-21 06:44:13 · 1441 阅读 · 0 评论 -
UVa 10008 What's Cryptanalysis? (water ver.)
10008 - What's Cryptanalysis?Time limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=949Cryptanalysis is the process原创 2013-09-21 10:21:51 · 1564 阅读 · 0 评论 -
4th IIUC Inter-University Programming Contest, 2005 / UVa 10905 Children's Game (等长转化技巧)
10905 - Children's GameTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=512&page=show_problem&problem=1846There are lots of number games原创 2013-09-02 13:16:55 · 1335 阅读 · 0 评论 -
UVa 10954 Add All (哈弗曼树)
10954 - Add AllTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=113&page=show_problem&problem=1895Yup!! The problem name reflects your t原创 2013-10-06 13:55:33 · 1302 阅读 · 0 评论 -
POJ 3253 Fence Repair (贪心&优先队列)
z原创 2013-09-24 19:02:51 · 1352 阅读 · 0 评论 -
UVa 10881 Piotr's Ants (等价转化思想)
10881 - Piotr's AntsTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=456&page=show_problem&problem=1822"One thing is for certain原创 2013-09-01 16:41:41 · 852 阅读 · 0 评论 -
UVa 1362 Exploring Pyramids (多叉树遍历&DP)
1362 - Exploring PyramidsTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=469&page=show_problem&problem=4108Archaeologists have discover原创 2013-10-13 09:37:09 · 1037 阅读 · 0 评论 -
UVa 10010 Where's Waldorf? (八方向字符串匹配&模板题)
10010 - Where's Waldorf?Time limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=96&page=show_problem&problem=951Given a m by n grid of letter原创 2013-09-28 18:13:02 · 1196 阅读 · 0 评论 -
NWERC 2006 / UVa 12097 Pie (二分法求精度)
12097 - PieTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=456&page=show_problem&problem=3249 My birthday is coming up and traditio原创 2013-09-03 19:22:19 · 1474 阅读 · 0 评论 -
UVa 455 Periodic Strings (字符串处理)
455 - Periodic StringsTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=396A character string is said to have period k if it can be f原创 2013-09-27 19:51:29 · 2488 阅读 · 0 评论 -
UVa 642 Word Amalgamation (查字典&字符串排序)
642 - Word AmalgamationTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=583In millions of newspapers across the United States there原创 2013-09-28 00:08:44 · 1346 阅读 · 0 评论 -
UVa 409 Excuses, Excuses! (字符串匹配)
409 - Excuses, Excuses!Time limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=96&page=show_problem&problem=350Judge Ito is having a problem wi原创 2013-09-28 23:46:12 · 906 阅读 · 0 评论 -
UVa 10815 Andy's First Dictionary (分离字符串)
10815 - Andy's First DictionaryTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=96&page=show_problem&problem=1756Andy, 8, has a dream -原创 2013-09-29 08:24:12 · 1626 阅读 · 0 评论 -
UVa 644 Immediate Decodability (前缀匹配)
644 - Immediate DecodabilityTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=96&page=show_problem&problem=585An encoding of a set of sym原创 2013-09-29 08:41:06 · 1099 阅读 · 2 评论 -
UVa 537 Artificial Intelligence? (字符串查找与匹配)
537 - Artificial Intelligence?Time limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=96&page=show_problem&problem=478Physics teachers in high原创 2013-09-28 23:21:02 · 1131 阅读 · 0 评论 -
UVa 10878 Decode the tape (趣题)
10878 - Decode the tapeTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=96&page=show_problem&problem=1819"Machines take me by su原创 2013-09-29 00:13:31 · 900 阅读 · 0 评论