摘要:Problem AChess QueenInput:Standard InputOutput:Standard OutputYou probably know how the game of chess is played and how chess queen operates. Two chess queens are in attacking position when they are on same row, column or diagonal of a chess board. Suppose two such chess queens (one black and the ot
阅读全文
摘要:K -Yukari's BirthdayTime Limit:6000MSMemory Limit:0KB64bit IO Format:%lld & %lluUVALive 6076DescriptionToday is Yukari'sn-th birthday. Ran and Chen hold a celebration party for her. Now comes the most important part, birthday cake! But it's a big challenge for them to placencandles o
阅读全文
摘要:E -Conquer a New RegionE -Conquer a New RegionTime Limit:3000MSMemory Limit:0KB64bit IO Format:%lld & %lluSubmitStatusPracticeUVALive 6070DescriptionThe wheel of the history rolling forward, our king conquered a new region in a distant continent.There areNtowns (numbered from 1 toN) in this regi
阅读全文
摘要:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=3&problem=38&mosmsg=Submission+received+with+ID+11541056Ecological Bin PackingTime limit: 3.000 secondsBackground背景Bin packing, or the placement of objects of certain weights into diff
阅读全文
摘要:Piotr'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 left or
阅读全文
摘要:The 3n+ 1 problemBackgroundProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is not known for all possible inputs.The ProblemConsider t
阅读全文