题目链接~~> 做题感悟:这种题以前做过类似的题,但是在做这题时一直超内存,真心无语,后来才发现开一个数组就 ok了我傻傻的开了两个怪不得呢 ! 做完之后百度了一下原来还有更简单的方法不用开数组就可以了。 解题思路:1 ) 开数组。可以先打个表,把到前 i 个的和存到 f [ i ] 中,这样就可以用二分查找到 s 处于第几堆,然后再用一次二分查找在第几层。
链接:http://poj.org/problem?id=2446 题目: Chessboard Time Limit: 2000MS Memory Limit: 65536KTotal Submissions: 12573 Accepted: 3907 Description Alice and Bob often play games on chessboard.
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2446 Problem Description In the 17th century, with thunderous noise, dense smoke and blazing fire, battles on the sea were just the same as thos