poj

POJ-1011(Sticks)

人盡茶涼 提交于 2020-12-19 04:58:30
Description George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the original state, but he forgot how many sticks he had originally and how long they were originally. Please help him and design a program which computes the smallest possible original length of those sticks. All lengths expressed in units are integers greater than zero. Input The input contains blocks of 2 lines. The first line contains the number of sticks parts after cutting, there are at most 64 sticks. The second line contains the lengths

poj 1953 World Cup Noise

北城以北 提交于 2020-12-14 05:54:15
World Cup Noise Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 14753 Accepted: 7302 Description Background "KO-RE-A, KO-RE-A" shout 54.000 happy football fans after their team has reached the semifinals of the FIFA World Cup in their home country. But although their excitement is real, the Korean people are still very organized by nature. For example, they have organized huge trumpets (that sound like blowing a ship's horn) to support their team playing on the field. The fans want to keep the level of noise constant throughout the match. The trumpets are operated by compressed gas.

poj 2488 A Knight's Journey

眉间皱痕 提交于 2020-04-17 03:50:53
【推荐阅读】微服务还能火多久?>>> dfs 注意字典序输出 A Knight's Journey Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 27075 Accepted: 9231 Description Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. Whenever a knight moves, it is two squares in one direction and one square perpendicular to this. The world of a knight is the chessboard he is living on. Our knight lives on a chessboard that has a smaller area than a regular 8 * 8 board, but it is still rectangular. Can you help this adventurous knight to

poj 1806 Manhattan 2025

送分小仙女□ 提交于 2020-04-15 09:55:05
【推荐阅读】微服务还能火多久?>>> Manhattan 2025 Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 2368 Accepted: 1100 Description Background Manhattan in the year 2025 - it is so densely populated that its old two-dimensional grid of streets and avenues fails to provide enough space for all the traditional vehicles such as cars, bicycles, or busses.Accordingly, the newly developed 3D-Skyjetters become very popular, because they allow to pass the traffic jams on the ground by flying in the air. After a series of horrible accidents caused by 3D-Skyjetters cutting a corner, New York authorities have

POJ 2136 Vertical Histogram

↘锁芯ラ 提交于 2020-04-07 07:45:45
Vertical Histogram Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 20245 Accepted: 9626 Description Write a program to read four lines of upper case (i.e., all CAPITAL LETTERS) text input (no more than 72 characters per line) from the input file and print a vertical histogram that shows how many times each letter (but not blanks, digits, or punctuation) appears in the all-upper-case input. Format your output exactly as shown. Input * Lines 1..4: Four lines of upper case text, no more than 72 characters per line. Output * Lines 1..??: Several lines with asterisks and spaces followed

poj 1002 487-3279

陌路散爱 提交于 2020-03-02 07:44:56
487-3279 Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 226038 Accepted: 39379 Description 企业喜欢用容易被记住的电话号码。让电话号码容易被记住的一个办法是将它写成一个容易记住的单词或者短语。例如,你需要给滑铁卢大学打电话时,可以拨打 TUT-GLOP。有时,只将电话号码中部分数字拼写成单词。当你晚上回到酒店,可以通过拨打310-GINO来向Gino's订一份pizza。让电话 号码容易被记住的另一个办法是以一种好记的方式对号码的数字进行分组。通过拨打必胜客的“三个十”号码3-10-10-10,你可以从他们那里订 pizza。 电话号码的标准格式是七位十进制数,并在第三、第四位数字之间有一个连接符。电话拨号盘提供了从字母到数字的映射,映射关系如下: A, B, 和C 映射到 2 D, E, 和F 映射到 3 G, H, 和I 映射到 4 J, K, 和L 映射到 5 M, N, 和O 映射到 6 P, R, 和S 映射到 7 T, U, 和V 映射到 8 W, X, 和Y 映射到 9 Q和Z没有映射到任何数字,连字符不需要拨号,可以任意添加和删除。 TUT-GLOP的标准格式是888-4567,310-GINO的标准格式是310-4466,3-10-10