09 2009 档案
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4217Accepted: 1939DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more tha...
阅读全文
摘要:Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 10318Accepted: 5591DescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinfo...
阅读全文
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 7844Accepted: 2685DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on anothe...
阅读全文
摘要:Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 11223Accepted: 2809Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄...
阅读全文
摘要:Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 6639Accepted: 2341DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very pecul...
阅读全文
摘要:Time Limit: 1000MSMemory Limit: 30000KTotal Submissions: 4872Accepted: 1515DescriptionSeveral currency exchange points are working in our city. Let us suppose that each point specializes in two partic...
阅读全文
摘要:模拟类DescriptionThis problem is a reverse case of the problem 2996. You are given the output of the problem H and your task is to find the corresponding input. Inputaccording to output of problem ...
阅读全文
摘要:模拟类DescriptionYour task is to read a picture of a chessboard position and print it in the chess notation. InputThe input consists of an ASCII-art picture of a chessboard with chess pieces on posi...
阅读全文
摘要:模拟类DescriptionA robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in a grid. The possible instructions are N nort...
阅读全文
摘要:模拟类DescriptionIn a modernized warehouse, robots are used to fetch the goods. Careful planning is needed to ensure that the robots reach their destinations without crashing into each other. Of course, ...
阅读全文
摘要:模拟类DescriptionLet S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways: q By an integer sequence P = p1 p2...pn where pi is the number of left parentheses bef...
阅读全文
摘要:输入字符串为二叉树的先根遍历(Pre-order string),可采用堆栈或者递归。一般pre-order 字符串计算使用递归, post-order 字符串计算使用堆栈DescriptionWFF 'N PROOF is a logic game played with dice. Each die has six faces representing some subset of the p...
阅读全文
摘要:一共四种可能的情况1) 4s + d 〉0,ssssdssssdss2)3s + 2d 〉 0,sssddsssddss3)2s + 3d 〉 0,ssdddssdddss4)1s + 4d 〉 0,sddddsddddsd并且对于给定的s和d, year sum: 1)〉 2) 〉 3) 〉 4)DescriptionAccounting for Computer Mac...
阅读全文
摘要:贪心算法的基本要素1.贪心选择性质 所谓贪心选择性质是指所求问题的整体最优解可以通过一系列局部最优的选择,即贪心选择来达到。这是贪心算法可行的第一个基本要素,也是贪心算法与动态规划算法的主要区别。在动态规划算法中,每步所作的选择往往依赖于相关子问题的解。因而只有在解出相关子问题后,才能作出选择。而在贪心算法中,仅在当前状态下作出最好选择,即局部最优选择。然...
阅读全文
摘要:POJ 2965, The Pilots Brothers' refrigeratorPOJ 1753, Flip Game这两道题类似,可转化图论的最短路径问题:顶点(Vertex)数:65536边(Edge)数:65536 * 16 / 2边的权值(Weight):1对于给定两个点, 求最短路径:由于边的权值均为1, 所以适宜采用BFS + Mark Table, 时间复杂度为O(N), N为...
阅读全文
摘要:POJ 2965, The Pilots Brothers' refrigeratorPOJ 1753, Flip Game这两道题类似,可转化图论的最短路径问题:顶点(Vertex)数:65536边(Edge)数:65536 * 16 / 2边的权值(Weight):1对于给定两个点, 求最短路径:由于边的权值均为1, 所以适宜采用BFS + Mark Table, 时间复杂度为O(N), N为...
阅读全文

浙公网安备 33010602011771号