04 2012 档案
NYOJ 303 序号互换(规律)---河南第四届ACM省赛
摘要:序号互换时间限制:1000ms | 内存限制:65535KB难度:2描述Dr.Kong设计了一个聪明的机器人卡多,卡多会对电子表格中的单元格坐标快速计算出来。单元格的行坐标是由数字编号的数字序号,而列坐标使用字母序号。观察字母序号,发现第1列到第26列的字母序号分别为A,B,…,Z,接着,第27列序号为AA,第28列为AB,依此类推。若给Dr.Kong的机器人卡多一个数字序号(比如32),它能很快算出等价的字母序号(即AF),若给机器人一个字母序号(比如AA)),它也能很快算出等价的数字序号(27),你能不能与卡多比试比试,看谁能算得更快更准确。输入第一行: N 表示有多少组测试数据。接下来有
阅读全文
HDU 1864 最大报销额(01背包应用)
摘要:最大报销额Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9752Accepted Submission(s): 2603Problem Description现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类),要求每张发票的总额不得超过1000元,每张发票上,单项物品的价值不得超过600元。现请你编写程序,在给出的一堆发票中找出可以报销的、不超过给定额度的最大报销额。Input测试输入包含若干
阅读全文
SDUT 1918 运送物资(并查集的应用)
摘要:运送物资Time Limit: 1000MS Memory limit: 65536K 题目描述A地区发生了洪灾,造成部分道路被毁,通信中断。为了先安顿受灾群众,政府决定利用船只向各个灾民聚集区域运送救灾物资。已知A地区共有居民居住点N个,编号为1-N,受灾后经过卫星拍摄的图片发现还有M条道路可用,并且两个居民居住点之间可能有多条道路相连,也可能无路可通。有道路相连的居民居住点可以认为是一个灾民聚集区域,因为在这个区域内部还可以使用陆地交通工具进行物资的交换。由于洪灾发生的太突然,所有的人员都没有来得及转移,也就是说A地区所有居民居住点都有居民被困。为了尽快完成任务,政府需要知道至少需要多少船
阅读全文
POJ 2471 || SDUT 2357 Bullshit Bingo(字符串处理)
摘要:Bullshit BingoTime Limit:1000MSMemory Limit:65536KTotal Submissions:1815Accepted:630DescriptionBullshit Bingo is a game to make lectures, seminars or meetings less boring. Every player has a card with 5 rows and 5 columns. Each of the 25 cells contains a word (the cell in the middle has always the w
阅读全文
POJ 2470 || SDUT 2356 Ambiguous permutations(简单规律)
摘要:Ambiguous permutationsTime Limit:1000MSMemory Limit:65536KTotal Submissions:5319Accepted:3145DescriptionSome programming contest problems are really tricky: not only do they require a different output format from what you might have expected, but also the sample output does not show the difference.
阅读全文
POJ 2472 ||SDUT 2358 106 miles to Chicago(Dijkstra算法变形)
摘要:106 miles to ChicagoTime Limit:2000MSMemory Limit:65536KTotal Submissions:2765Accepted:1328Special JudgeDescriptionIn the movie "Blues Brothers", the orphanage where Elwood and Jack were raised may be sold to the Board of Education if they do not pay 5000 dollars in taxes at the Cook Count
阅读全文
POJ 2418 Hardwood Species(二叉排序树)
摘要:Hardwood SpeciesTime Limit:10000MSMemory Limit:65536KTotal Submissions:12870Accepted:5261DescriptionHardwoods are the botanical group of trees that have broad leaves, produce a fruit or nut, and generally go dormant in the winter. America's temperate climates produce forests with hundreds of har
阅读全文
POJ 2513 Colored Sticks(字典树 + 并查集 + 欧拉回路)
摘要:Colored SticksTime Limit:5000MSMemory Limit:128000KTotal Submissions:23116Accepted:6095DescriptionYou are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a straight line such that the colors of the endpoints that touch are
阅读全文
POJ 2442 Sequence(堆的应用)
摘要:SequenceTime Limit:6000MSMemory Limit:65536KTotal Submissions:4906Accepted:1490DescriptionGiven m sequences, each contains n non-negative integer. Now we may select one number from each sequence to form a sequence with m integers. It's clear that we may get n ^ m this kind of sequences. Then we
阅读全文
POJ 3185 The Water Bowls(DFS搜索)
摘要:The Water BowlsTime Limit:1000MSMemory Limit:65536KTotal Submissions:3071Accepted:1173DescriptionThe cows have a line of 20 water bowls from which they drink. The bowls can be either right-side-up (properly oriented to serve refreshing cool water) or upside-down (a position which holds no water). Th
阅读全文
POJ 3193 Cow Phrasebook(简单字符串的处理)
摘要:Cow PhrasebookTime Limit:1000MSMemory Limit:65536KTotal Submissions:2358Accepted:796DescriptionEver theinnovator, Farmer John is teaching cows to speak some phrases in humanlanguage. He writes each new phrase the cows learn in his phrase book, a totalof M (1 <= M <= 1,000) so far.When Farmer J
阅读全文
POJ 3183 Stump Removal(简单的贪心)
摘要:StumpRemovalTime Limit:1000MSMemory Limit:65536KTotal Submissions:2459Accepted:1314DescriptionAlways thinking ofthe cows' grazing experience, FJ has found that he must remove N (1 <= N<= 50,000) unsightly stumps from the pasture. The stumps are convenientlyarranged in a straight line and n
阅读全文
POJ 3191 The Moronic Cowmpouter(二进制的变形)
摘要:TheMoronic CowmpouterTime Limit:1000MSMemory Limit:65536KTotal Submissions:2402Accepted:1227DescriptionInexperienced in the digital arts, the cows tried to build acalculating engine (yes, it's a cowmpouter) using binary numbers (base 2) butinstead built one based on base negative 2! They were qu
阅读全文
HDU 4033 Regular Polygon(几何 + 二分)
摘要:Regular PolygonTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others) Total Submission(s): 2203Accepted Submission(s): 682Problem DescriptionIn a 2_D plane, there is a point strictly in a regular polygon with N sides. If you are given the distances between it and N vertexes
阅读全文
HDU 4036 Rolling Hongshu(数学+物理应用)
摘要:Rolling HongshuTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others) Total Submission(s): 1230Accepted Submission(s): 367Problem DescriptionTo see his girl friend, sweet potato has to go over thousands of mountains. What make things worse, many bitter potatoes lives in thes
阅读全文
HDU 4034 Graph(Floyd变形)
摘要:GraphTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others) Total Submission(s): 950Accepted Submission(s): 505Problem DescriptionEveryone knows how to calculate the shortest path in a directed graph. In fact, the opposite problem is also easy. Given the length of shortest p
阅读全文
HDU 3346 Lucky Number(简单题)
摘要:Lucky NumberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1240Accepted Submission(s): 635Problem DescriptionTo Chinese people, 8 is a lucky number. Now your task is to judge if a number is lucky. We say a number is lucky if it’s a multiple of 8,
阅读全文
ZOJ 2855 Google Map(计算几何)
摘要:Google MapTime Limit:2 Seconds Memory Limit:65536 KBGoogleMap is a useful tool and most of you should be familiar with it. As the best hacker in the world, Jack is planning to retrieve all the data on the GoogleMap server. But he soon gives up because the total amount of data exceeds 1000T bytes! Bu
阅读全文
ZOJ 2851 Code Formatter(简单字符统计)
摘要:Code FormatterTime Limit: 2 Seconds Memory Limit: 65536 KBSome companies have special requirements for source code format, and it is also good for programmers to keep consistent code style. You are asked to write a simple code formatter for the company to help the poor programmers.The first thing yo
阅读全文
ZOJ 2857 Image Transformation (简单题)
摘要:Image TransformationTime Limit: 2 Seconds Memory Limit: 65536 KBThe image stored on a computer can be represented as a matrix of pixels. In the RGB (Red-Green-Blue) color system, a pixel can be described as a triplex integer numbers. That is, the color of a pixel is in the format "r g b" w
阅读全文
ZOJ 2850 Beautiful Meadow (简单题)
摘要:Beautiful MeadowTime Limit: 2 Seconds Memory Limit: 65536 KB Tom has a meadow in his garden. He divides it into N * M squares. Initially all the squares were covered with grass. He mowed down the grass on some of the squares and thinks the meadow is beautiful if and...
阅读全文
浙公网安备 33010602011771号