ICPC-STL标准模板库
文章平均质量分 89
STL有关的题解
海岛Blog
专注于程序设计及其竞赛,专注于集成电路EDA设计
展开
-
POJ3044 City Skyline【stack】
City SkylineTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3631 Accepted: 1633DescriptionThe best part of the day for Farmer John’s cows is when the sun sets. They can see the skyline of the distant city. Bessie wonders how many buildings原创 2021-08-01 01:17:32 · 317 阅读 · 0 评论 -
UVA230 WF5169 POJ1886 Borrowers【map+set】
BorrowersTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 1621 Accepted: 389DescriptionI mean your borrowers of books–those mutilators of collections, spoilers of the symmetry of shelves, and creators of odd volumes.–Charles Lamb, Essays of原创 2021-04-26 06:44:46 · 213 阅读 · 0 评论 -
UVA11634 HDU2991 Generate random numbers【set】
Generate random numbersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 405 Accepted Submission(s): 195Problem DescriptionJohn von Neumann suggested in 1946 a method to create a sequence of pseu原创 2021-04-22 05:47:54 · 370 阅读 · 0 评论 -
UVA10887 Concatenation of Languages【set】
A language is a set of strings. And the concatenation of two languages is the set of all strings that are formed by concatenating the strings of the second language at the end of the strings of the first language. For example, if we原创 2021-02-08 00:40:05 · 285 阅读 · 0 评论 -
HDU1509 ZOJ2724 Windows Message Queue【优先队列】
Windows Message QueueTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12375 Accepted Submission(s): 5194Problem DescriptionMessage queue is the basic fundamental of windows system. For each proc原创 2021-02-03 23:05:32 · 286 阅读 · 1 评论 -
HDU1263 水果【map】
水果Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18636 Accepted Submission(s): 7191Problem Description夏天来了~~好开心啊,呵呵,好多好多水果~~Joe经营着一个不大的水果店.他认为生存之道就是经营最受顾客欢迎的水果.现在他想要一份水果销售情况的明细表,这样Joe就可以很容易掌握原创 2020-05-16 23:23:29 · 625 阅读 · 0 评论 -
UVA496 Simply Subsets【STL+集合运算】
After graduating from the University of Notre Dame, you obtained a job at Top Shelf Software, Inc.,as an entry-level computer engineer. On the first day, your manager sits down with you and tasksyou...原创 2020-04-27 01:18:51 · 410 阅读 · 0 评论 -
HDU1506 POJ2559 Largest Rectangle in a Histogram【单调堆栈】
Largest Rectangle in a HistogramTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 31315 Accepted Submission(s): 10156Problem DescriptionA h...原创 2020-04-10 20:07:22 · 299 阅读 · 0 评论 -
UVA11414 Dream【vector+sort】
Tarzan lives in a forest where there are n mysterious points. Tarzan is given the task of laying mysterious paths in the forest connecting mysterious points. Tarzan is blessed with the power to lay my...原创 2020-04-01 23:33:32 · 272 阅读 · 1 评论 -
UVA551 LA5567 Nesting a Bunch of Brackets【堆栈+map】
In this problem we consider expressions containing brackets that are properly nested. These expressions are obtained by juxtaposition of properly netsted expressions in a pair of matching brackets, th...原创 2020-03-29 21:41:13 · 638 阅读 · 0 评论 -
HDU2648 Shopping【map】
ShoppingTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6661 Accepted Submission(s): 2326Problem DescriptionEvery girl likes shopping,so...原创 2020-02-23 15:18:31 · 483 阅读 · 0 评论 -
HDU4841 圆桌问题【约瑟夫环+模拟+STL】
圆桌问题Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 6757 Accepted Submission(s): 2550Problem Description圆桌上围坐着2n个人。其中n个人是好人,另外n个人是坏人。如果从第...原创 2020-02-23 14:12:04 · 784 阅读 · 0 评论 -
UVA11034 POJ3282 Ferry Loading IV【queue】
Ferry Loading IVTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2150 Accepted: 884DescriptionBefore bridges were common, ferries were used to transport cars across rivers. River ferrie...原创 2019-05-01 23:55:25 · 634 阅读 · 0 评论 -
UVA10374 POJ2643 ZOJ1854 Election【map】
ElectionTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4776 Accepted: 2195DescriptionCanada has a multi-party system of government. Each candidate is generally associated with a party...原创 2019-04-19 08:14:21 · 337 阅读 · 0 评论 -
UVA11062 Andy's Second Dictionary【set】
Andy is now 9-year old and is getting ambitious. He wants to become the world largest dictionary editor. You have already helped him to solve a problem with a computer and he now turns back to you wit...原创 2019-05-14 00:27:26 · 335 阅读 · 0 评论 -
UVA978 Lemmings Battle!【STL】
Oh no… more lemmings!! And in Lemmings Planet a huge battle is being fought between the two great rival races: the green lemmings and the blue lemmings. Everybody was now assigned to battle and they w...原创 2019-05-15 07:18:35 · 430 阅读 · 0 评论 -
UVA10227 POJ2419 ZOJ1900 Forests【并查集+set】
If a tree falls in the forest, and there’s nobody there to hear, does it make a sound? This classic conundrum was coined by George Berkeley (1685-1753), the Bishop and influential Irish philosopher wh...原创 2019-05-08 06:54:26 · 417 阅读 · 0 评论 -
UVA501 LA5645 ZOJ1319 POJ1442 Black Box【优先队列】
Our Black Box represents a primitive database. It can save an integer array and has a special i variable. At the initial moment Black Box is empty and i equals 0. This Black Box processes a sequence o...原创 2019-05-15 22:08:46 · 377 阅读 · 0 评论 -
UVA12592 Slogan Learning of Princess【map】
Prince Macaw is flying here and there and searching for food. Her Princess is waiting for him at home. But he stopped when he was flying near Shahbag. He saw millions of people gathered there for only...原创 2019-05-16 07:54:02 · 501 阅读 · 0 评论 -
UVA11308 Bankrupt Baker【map+vector】
Wolfgang Puck has an extensive collection of cake recipes. They are separated into different binders depending on the type of cake. Although Wolfgang has restaurant franchises all over the world, he i...原创 2019-05-01 19:53:48 · 332 阅读 · 0 评论 -
UVA119 Greedy Gift Givers【map+水题】
This problem involves determining, for a group of gift-giving friends, how much more each person gives than they receive (and vice versa for those that view gift-giving with cynicism). &nb...原创 2019-04-10 06:03:59 · 434 阅读 · 0 评论 -
UVA11136 Hoax or what【multiset+deque】
UVA11136 Hoax or whatEach Mal-Wart supermarket has prepared a promotion scheme run by the following rules:• A client who wants to participate in the promotion (aka a sucker) must write down their ph...原创 2019-03-28 08:56:34 · 414 阅读 · 0 评论 -
POJ2418 UVA10226 ZOJ1899 Hardwood Species【map】
Hardwood SpeciesTime Limit: 10000MS Memory Limit: 65536KTotal Submissions: 26828 Accepted: 10215DescriptionHardwoods are the botanical group of trees that have broad leaves, produce a fruit or n...原创 2019-03-27 11:23:13 · 660 阅读 · 0 评论 -
POJ3297 UVA11239 Open Source【map】
Open SourceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1860 Accepted: 757DescriptionAt an open-source fair held at a major university, leaders of open-source projects put sign-up s...原创 2019-03-29 23:50:34 · 445 阅读 · 0 评论 -
POJ2652 HDU1146 ZOJ2550 UVA10901 Ferry Loading III【模拟+queue+vecoor】
Ferry Loading IIITime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 988 Accepted: 318DescriptionBefore bridges were common, ferries were used to transport cars across rivers. River ferrie...原创 2019-03-22 20:16:56 · 547 阅读 · 0 评论 -
UVA727 LA5364 Equation【后缀表达式】
Write a program that changes an infix expression to a postfix expression according to the following specifications.InputThe infix expression to be converted is in the input file in the format of on...原创 2019-03-20 16:36:02 · 358 阅读 · 0 评论 -
HDU1623 UVA123 Searching Quickly【multimap】
Searching QuicklyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 299 Accepted Submission(s): 55Problem DescriptionSearching and sorting a...原创 2019-02-17 01:01:44 · 335 阅读 · 0 评论 -
UVA10420 List of Conquests【map】
In Act I, Leporello is telling Donna Elvira about his master’s long list of conquests: “This is the list of the beauties my master has loved, a list I’ve made out myself: take ...原创 2019-02-16 23:05:35 · 383 阅读 · 0 评论 -
UVA417 LA5392 POJ1496 HDU1336 ZOJ1342 Word Index【map+queue+递推组合】
Word IndexTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 5333 Accepted: 3011DescriptionEncoding schemes are often used in situations requiring encryption or information storage/transm...原创 2019-05-16 08:42:51 · 428 阅读 · 0 评论 -
POJ3640 UVA11286 HDU1904 Conformity【map】
ConformityTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2981 Accepted: 908DescriptionFrosh commencing their studies at Waterloo have diverse interests, as evidenced by their desire t...原创 2019-05-16 10:40:03 · 875 阅读 · 0 评论 -
UVALive4536 POJ3824 HDU3328 Flipper【模拟+堆栈】
FlipperTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 106 Accepted: 52DescriptionLittle Bobby Roberts (son of Big Bob, of Problem G) plays this solitai原创 2017-07-26 22:54:39 · 948 阅读 · 0 评论 -
UVA11926 Multitasking【bitset】
Calendars control our daily lives. For people like me, who are bad at multitasking, it is important to have at most one task planned for any minute of my life. Your job is to make sure that my calenda...原创 2019-07-20 17:04:00 · 255 阅读 · 0 评论 -
UVA860 Entropy Text Analyzer【map】
Claude Shannon, mathematician and computer scientist, born on April 30 1916, and died on February 24 2001, was the one who create the mathematical foundations which laid down the general rules of mode...原创 2019-06-09 21:23:54 · 304 阅读 · 0 评论 -
UVA939 Genes【map】
For many years, the Genetic Evolution Laboratory (GEL) has been studying the evolution of various genetic diseases, by collecting, for each disease, data from a large population, over several generati...原创 2019-06-09 20:12:26 · 370 阅读 · 0 评论 -
UVA11629 HDU2986 Ballot evaluation【map】
Before the 2009 elections at the European Parliament, Bill and Ted have asked their friends to make guesses about the outcome of the ballot. Now, the results have been published, so Bill and Ted want ...原创 2019-06-09 06:04:55 · 310 阅读 · 0 评论 -
UVA10132 ZOJ1832 File Fragmentation【vector】
Your friend, a biochemistry major, tripped while carrying a tray of computer files through the lab. All of the files fell to the ground and broke. Your friend picked up all the file fragments and call...原创 2019-05-29 11:10:22 · 328 阅读 · 0 评论 -
UVA10686 SQF Problems【map+vector】
Juciano, Sebasti˜ao e S´ergio formed a very good ACM team. They used to do a lot of problems butthey were not organized and they have never classified the problems when they solved them.As the ACM S...原创 2019-06-05 17:09:24 · 363 阅读 · 0 评论 -
UVA10138 POJ2648 ZOJ1849 CDVII【map+排序】
Roman roads are famous for their longevity and sound engineering. Unfortunately, sound engineering does not come cheap, and a number of neo-Caesars have decided to recover the costs through automated ...原创 2019-05-31 11:18:47 · 335 阅读 · 0 评论 -
UVA454 Anagrams【set+排序】
An anagram is a word or phrase formed by rearranging the letters of another word or phrase. For example, “carthorse” is an anagram of “orchestra”. Blanks within a phrase are ignored in forming anagram...原创 2019-05-30 23:54:25 · 566 阅读 · 0 评论 -
UVA11917 Do Your Own Homework【map】
These days Soha is so busy that he doesn’t have time to do his own homework. But this is not a big problem since he has got many friends who are willing to help. One if his friend’s name is Sparrow. W...原创 2019-05-18 11:12:01 · 534 阅读 · 0 评论