上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 29 下一页
摘要: DescriptionBootstrap: Wondering how it's played? Will: It's a game of deception. But your bet includes all the dice, not just your own. What are they wagering? Bootstrap: Oh, the only thing we have. Years of service. Will: So any crew member can be challenged? Bootstrap: Aye. Anyone. Will: I 阅读全文
posted @ 2013-08-25 22:03 Oyking 阅读(430) 评论(2) 推荐(0) 编辑
摘要: DescriptionOne day, Implus gets interested in binary addition and binary carry. He will transfer all decimal digits to binary digits to make the addition. Not as clever as Gauss, to make the addition from a to b, he will add them one by one from a to b in order. For example, from 1 to 3 (decimal dig 阅读全文
posted @ 2013-08-24 18:01 Oyking 阅读(370) 评论(0) 推荐(0) 编辑
摘要: DescriptionSuppose that G is an undirected graph, and the value ofstabis defined as follows:Among the expression,G-i, -jis the remainder after removing node i, node j and all edges that are directly relevant to the previous two nodes.cntCompentis the number of connected components of X independently 阅读全文
posted @ 2013-08-24 16:59 Oyking 阅读(412) 评论(0) 推荐(0) 编辑
摘要: A and B are playing a shooting game on a battlefield consisting of square-shaped unit blocks. The blocks are occupying some consecutive columns, and the perimeter of the figure equals the perimeter of its minimal bounding box. The figure (a) below is a valid battlefield, but (b) and (c) are not, bec 阅读全文
posted @ 2013-08-23 23:06 Oyking 阅读(386) 评论(0) 推荐(0) 编辑
摘要: You live in a small town withRbidirectional roads connectingCcrossings and you want to go from crossing 1 to crossingCas soon as possible. You can visit other crossings before arriving at crossingC, but it's not mandatory.You have exactly one chance to ask your friend to repair exactly one exist 阅读全文
posted @ 2013-08-23 22:45 Oyking 阅读(714) 评论(0) 推荐(0) 编辑
摘要: You have a maze with obstacles and non-zero digits in it:You can start from any square, walk in the maze, and finally stop at some square. Each step, you may only walk into one of thefour neighbouring squares (up, down, left, right)and you cannot walk into obstacles or walk into a square more than o 阅读全文
posted @ 2013-08-23 22:17 Oyking 阅读(1431) 评论(0) 推荐(0) 编辑
摘要: In finance, Internal Rate of Return (IRR) is the discount rate of an investment when NPV equals zero. Formally, givenT,CF0,CF1, ...,CFT, thenIRRis the solution to the following equation:NPV=CF0+++K+= 0Your task is to find all validIRRs. In this problem, the initial cash-flowCF0 0for alli= 1, 2,...). 阅读全文
posted @ 2013-08-23 22:15 Oyking 阅读(561) 评论(0) 推荐(0) 编辑
摘要: Input: Standard Input Output: Standard Output� There is a rectangle on the cartesian plane, with bottom-left corner at (0,0) and top-right corner at(L,W). There is a ball centered at(x,y), with radius=R, shown belowAt time 0, the ball starts to move along a ray with polar anglea(the angle from posit 阅读全文
posted @ 2013-08-23 21:19 Oyking 阅读(338) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionConsider a Depth-First-Search(DFS) spanning tree T of a undirected connected graph G, we define a T-Simple Circle as a path v1, v2, ..., vk(v1= vk) in G that contains at most one edge which not belongs to the DFS spanning tree T.Given a graph G, we process DFS on G starting from v 阅读全文
posted @ 2013-08-22 19:50 Oyking 阅读(675) 评论(0) 推荐(0) 编辑
摘要: Problem Description Let f(x) = anxn+...+ a1x +a0, in which ai(0 = 3, otherwise abs(ai) 2 #include 3 #include 4 #include 5 using namespace std; 6 typedef long long LL; 7 8 const int MAXN = 8; 9 10 int T, deg;11 LL phi;12 LL a[MAXN];13 14 LL f(LL x, LL m) {15 LL ret = 0, xx = 1;16 for(in... 阅读全文
posted @ 2013-08-22 14:25 Oyking 阅读(451) 评论(5) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 29 下一页