摘要:Beijing was once surrounded by four rings of city walls: the Forbidden City Wall, the Imperial City Wall, the Inner City Wall, and finally the Outer City Wall. Most of these walls were demolished in the 50s and 60s to make way for roads. The walls were protected by guard towers, and there was a guar
阅读全文
摘要:International Center for Picassonian Cubismis a Spanish national museum of cubist artworks, dedicated to Pablo Picasso. The center held a competition for an artwork that will be displayed in front of the facade of the museum building. The artwork is a collection of cubes that are piled up on the gro
阅读全文
摘要:Problem F: Fabled RooksWe would like to placenrooks, 1≤n≤5000, on an×nboard subject to the following restrictionsThei-th rook can only be placed within the rectangle given by its left-upper corner (xli,yli) and its right-lower corner (xri,yri), where 1≤i≤n, 1≤xli≤xri≤n, 1≤yli≤yri≤n....
阅读全文
摘要:BAge SortInput:Standard InputOutput:Standard OutputYou are given the ages (in years) of all people of a country with at least 1 year of age. You know that no individual in that country lives for 100 or more years. Now, you are given a very simple task of sorting all the ages in ascending order.Input
阅读全文
摘要:Problem A: The Trip, 2007A number of students are members of a club that travels annually to exotic locations. Their destinations in the past have included Indianapolis, Phoenix, Nashville, Philadelphia, San Jose, Atlanta, Eindhoven, Orlando, Vancouver, Honolulu, Beverly Hills, Prague, Shanghai, and
阅读全文
摘要:IIUCONLINE CONTEST2008Problem E: The Bus Driver ProblemInput: standard inputOutput: standard outputIn a city there arenbus drivers. Also there arenmorning bus routes &nafternoon bus routes with various lengths. Each driver is assigned one morning route & one evening route. For any driver, if
阅读全文
摘要:Here is a famous story in Chinese history.That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to play horse racing with the king and others.Both of Tian and the king have three horses in different classes, namely, regular, plus, and super. The rule is to ha
阅读全文
摘要:A big city has an international airport handling 40 million passengers a year. But this is notorious as one of the most congested airports in the world. In this airport, there is only one landing strip as in the above figure. Therefore the landing strip is always crowded with a lot of aircrafts wait
阅读全文
摘要:Problem E: SlalomYou are competing in a ski slalom, and you need to select the best skis for the race. The format of the race is that there areNpairs of left and right gates, where each right gate isWmetres to the right of its corresponding left gate, and you may neither pass to t...
阅读全文
摘要:Problem C - PieTime limit: 1 secondMy birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a numberNof them, of various tastes and of various sizes.Fof my friends are coming to my party and each of them gets a piece of pie. This should be one piece of one pie, no
阅读全文
摘要:Problem A - Assemble Time limit: 2 secondsRecently your team noticed that the computer you use to practice for programming contests is not good enough anymore. Therefore, you decide to buy a new computer.To make the ideal computer for your needs...
阅读全文
摘要:Problem HHelp is needed for DexterTime Limit: 3 SecondDexter is tired of Dee Dee. So he decided to keep Dee Dee busy in a game. The game he planned for her is quite easy to play but not easy to win at least not for Dee Dee. But Dexter does not have time to spend on this silly task, so he wants your
阅读全文
摘要:John Doe is a famous DJ and, therefore, has the problem of optimizing the placement of songs on his tapes. For a given tape and for each song on that tape John knows the length of the song and the frequency of playing that song. His problem is to record the songs on the tape in an order that minimiz
阅读全文
摘要:DEven ParityInput:Standard InputOutput:Standard OutputWe have a grid of sizeNxN. Each cell of the grid initially contains a zero(0) or a one(1).Theparityof a cell is the number of 1s surrounding that cell. A cell is surrounded by at most 4 cells (top, bottom, left, right).Suppose we have a grid of s
阅读全文
摘要:从书籍主页搬运过来的,这样的话查看题目更方便。对与已经AC的题目我用红色字体进行了标记。问题求解策略 (General Problem Solving Techniques)例题 (Examples)例题 1UVa11292The Dragon of Loowater排序后用贪心法例题 2UVa11729Commando War用贪心法求最优排列;用“相邻交换法”证明正确性例题 3UVa11300Spreading The Wealth用代数法进行数学推导;中位数例题 4LA3708Graveyard推理;参考系例题 5UVa10881Piotr's Ants等效变换;排序例题 6LA
阅读全文
摘要:Problem DPiotr's AntsTime Limit: 2 seconds"One thing is for certain: there is no stopping them;the ants will soon be here. And I, for one, welcome ournew insect overlords."Kent BrockmanPiotr likes playing with ants. He hasnof them on a horizontal poleLcm long. Each ant is facing either
阅读全文
摘要:How Big Is It?Ian's going to California, and he has to pack his things, including his collection of circles. Given a set of circles, your program must find the smallest rectangular box in which they fit. All circles must touch the bottom of the box. The figure below shows an acceptable packing f
阅读全文
摘要:Problem APlay with Floor and CeilInput:standard inputOutput:standard outputTime Limit:1 secondTheoremFor any two integersxandkthere exists two more integerspandqsuch that: It’s a fairly easy task to prove this theorem, so we’d not ask you to do that. We’d ask for ...
阅读全文
摘要:Problem AFill the SquareInput:Standard InputOutput:Standard OutputIn this problem, you have to draw a square using uppercase English Alphabets.To be more precise, you will be given a square grid with some empty blocks and others already filled for you with some letters to make your task easier. You
阅读全文
摘要:4thIIUCInter-UniversityProgramming Contest, 2005AChildren’s GameInput: standard inputOutput: standard outputProblemsetter:Md.KamruzzamanThere are lots of number games for children. These games are pretty easy to play but not so easy to make. We will discuss about an interesting game here. Each playe
阅读全文