[HDU][线段树]1754.I Hate It

思路:利用线段树实现,具体参考:[算法系列之二十三]线段树(Interval Tree)代码/*--------------------------------------------- * 日期:2015-03-24 * 作者:SJF0115 * 题目: 1754.I Hate It * 来源:HDU * 网址:http://acm.hdu.edu.cn/showproblem...
阅读(1324) 评论(0)


Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。 中央...
阅读(1135) 评论(0)

[POJ]3277.City Horizon

DescriptionFarmer John has taken his cows on a trip to the city! As the sun sets, the cows gaze at the city horizon and observe the beautiful silhouettes formed by the rectangular buildings.The entire...
阅读(1118) 评论(0)

UVA之1330 - City Game

【题目】 Bob is a strategy game programming specialist. In his new city building game the gaming environment is as follows: a city is built up by areas, in which there are streets, trees, factories and...
阅读(1306) 评论(0)

UVA之1121 - Subsequence

【题目】 A sequence of N positive integers (10 N , each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal length of the subse...
阅读(1259) 评论(0)

UVA之1398 - Meteor

【题目】 The famous Korean internet company nhn has provided an internet-based photo service which allows The famous Korean internet company users to directly take a photo of an astronomical phenomenon...
阅读(1112) 评论(0)

UVA之11462 - Age Sort

【题目】 B Age Sort Input: Standard Input Output: Standard Output   You are given the ages (in years) of all people of a country with at least 1 year of age. You kn...
阅读(1350) 评论(0)

UVA之11549 - Calculator Conundrum

【题目】 Problem C CALCULATOR CONUNDRUM Alice got a hold of an old calculator that can display n digits. She was bored enough to come up with the following time waster. She enters a number k t...
阅读(1328) 评论(0)

UVA之11292 - Dragon of Loowater

Problem C: The Dragon of Loowater Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem. The shores of Rellau Creek in central Loowater had always been a prime...
阅读(1325) 评论(0)

UVA 之11729 - Commando War

There is a war and it doesn't look very promising for your country. Now it's time to act. You have a commando squad at your disposal and planning an ambush on an important enemy camp located nearby. Y...
阅读(1261) 评论(0)

UVA 之11300 - Spreading the Wealth

Problem A Communist regime is trying to redistribute wealth in a village. They have have decided to sit everyone around a circular table. First, everyone has converted all of their properties to co...
阅读(1216) 评论(0)

UVA 之401 - Palindromes

A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when the string is read from lef...
阅读(1297) 评论(0)

UVA 之10010 - Where's Waldorf?

Where's Waldorf?  Given a m by n grid of letters, ( ), and a list of words, find the location in the grid at which the word can be found. A word matches a straight, uninterrupted line o...
阅读(1206) 评论(0)

UVA之10361 - Automatic Poetry

Problem I Automatic Poetry Input: standard input Output: standard output Time Limit: 2 seconds Memory Limit: 32 MB   “Oh God”, Lara Croft exclaims, “it’s one of these dumb rid...
阅读(1255) 评论(0)

UVA之537 - Artificial Intelligence?

Artificial Intelligence?  Physics teachers in high school often think that problems given as text are more demanding than pure computations. After all, the pupils have to read and underst...
阅读(1112) 评论(0)

UVA之409 - Excuses, Excuses!

Excuses, Excuses!  Judge Ito is having a problem with people subpoenaed for jury duty giving rather lame excuses in order to avoid serving. In order to reduce the amount of time requi...
阅读(1158) 评论(0)

UVA之10878 - Decode the tape

【题目】 Your boss has just unearthed a roll of old computer tapes. The tapes have holes in them and might contain some sort of useful information. It falls to you to figure out what is written on them...
阅读(1101) 评论(0)

UVA之11078 - Open Credit System

【题目】 Problem E Open Credit System Input: Standard Input Output: Standard Output In an open credit system, the students can choose any course they like, but there is a problem. Some of the stude...
阅读(1350) 评论(0)

UVA之12124 - Assemble

【题目】 Problem A - Assemble Time limit: 2 seconds Recently your team noticed that the computer you use to practice for programming contests is not good enough anymore. Therefore, you decide to bu...
阅读(1175) 评论(0)

UVA之Fill the Square

Problem A Fill the Square Input: Standard Input Output: Standard Output   In this problem, you have to draw a square using uppercase English Alphabets. To be more precise, you will be given a sq...
阅读(1070) 评论(0)
23条 共2页1 2 下一页 尾页
    • 访问:1240476次
    • 积分:19944
    • 等级:
    • 排名:第437名
    • 原创:621篇
    • 转载:132篇
    • 译文:50篇
    • 评论:173条