摘要:
Sum It UpTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2906Accepted Submission(s): 1455Problem DescriptionGiven a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t=4 阅读全文
摘要:
RescueTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11566Accepted Submission(s): 4205Problem DescriptionAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M #include#define HH 11111111char a[2 阅读全文
摘要:
SquareTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5604Accepted Submission(s): 1776Problem DescriptionGiven a set of sticks of various lengths, is it possible to join them end-to-end to form a square?InputThe first line of input contains N, the 阅读全文
摘要:
Fire NetTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4683Accepted Submission(s): 2665Problem DescriptionSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a st 阅读全文
摘要:
How Many Answers Are WrongTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1475 Accepted Submission(s): 596Problem DescriptionTT and FF are ... friends. Uh... very very good friends -________-bFF is a bad boy, he is always wooing TT to play the fol 阅读全文
摘要:
The SuspectsTime Limit:1000MSMemory Limit:20000KTotal Submissions:17876Accepted:8659DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is to separa 阅读全文
摘要:
Wireless NetworkTime Limit:10000MSMemory Limit:65536KTotal Submissions:13679Accepted:5796DescriptionAn earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all computers in the n 阅读全文
摘要:
Find them, Catch themTime Limit:1000MSMemory Limit:10000KTotal Submissions:24739Accepted:7435DescriptionThe police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police first needs to identify whi 阅读全文
摘要:
Parity gameTime Limit:1000MSMemory Limit:65536KTotal Submissions:5287Accepted:2074DescriptionNow and then you play the following game with your friend. Your friend writes down a sequence consisting of zeroes and ones. You choose a continuous subsequence (for example the subsequence from the third to 阅读全文
摘要:
hdu 1598find the most comfortable road题目的意思是很多连接的点中,问x到y点的最小差值。差值的计算是,在这条路径中的最大的值-最小的值。感觉像流的问题。却十分巧妙的用并查集来做。问题的关键还是在处理 最小差值。1贪心+并查。将排序(从小到大)后的进行判断,是否f[x]==f[y]来结束。那谁是起点??这也是个难点,任一点都可能是起点,我们只能通过for(i=1;i=m+1)break; if(a[j].info-a[i].info<ans) ans=a[j].info-a[i].info; } if(ans==10000003) return -1; 阅读全文