摘要: 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 north (up the page) S south (down the page) E east (to the right on the page) W west (to the left on the pa 阅读全文
posted @ 2013-08-06 20:27 孔凡凯凯 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 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, all warehouses are rectangular, and all robots occupy a circular floor space with a diameter of 1 meter 阅读全文
posted @ 2013-08-06 20:24 孔凡凯凯 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 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 before the ith right parenthesis in S (P-sequence). q By an integer sequence W = w1 w2...wn where for each 阅读全文
posted @ 2013-08-06 20:19 孔凡凯凯 阅读(211) 评论(0) 推荐(0) 编辑
摘要: WFF 'N PROOF is a logic game played with dice. Each die has six faces representing some subset of the possible symbols K, A, N, C, E, p, q, r, s, t. A Well-formed formula (WFF) is any string of these symbols obeying the following rules:p, q, r, s, and t are WFFsif w is a WFF, Nw is a WFFif w and 阅读全文
posted @ 2013-08-06 20:10 孔凡凯凯 阅读(458) 评论(0) 推荐(0) 编辑
摘要: DescriptionIn how many ways can you tile a 2xn rectangle by 2x1 or 2x2 tiles? Here is a sample tiling of a 2x17 rectangle. InputInput is a sequence of lines, each line containing an integer number 0 2 #include 3 int main() 4 { 5 int s[261][160],i,j,k,a,t; 6 memset(s,0,sizeof(s)); 7 s[0]... 阅读全文
posted @ 2013-08-06 20:07 孔凡凯凯 阅读(268) 评论(0) 推荐(0) 编辑
摘要: DescriptionThere are so many different religions in the world today that it is difficult to keep track of them all. You are interested in finding out how many different religions students in your university believe in. You know that there are n students in your university (0 2 #include 3 #include .. 阅读全文
posted @ 2013-08-06 20:05 孔凡凯凯 阅读(211) 评论(0) 推荐(0) 编辑
摘要: Accounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc. All what they remember is that MS Inc. posted a surplus or a deficit each month of 1999 and each month when MS Inc. posted surplus, the amount of surplus was s and 阅读全文
posted @ 2013-08-06 20:02 孔凡凯凯 阅读(260) 评论(0) 推荐(0) 编辑
摘要: Current work in cryptography involves (among other things) large prime numbers and computing powers of numbers among these primes. Work in this area has resulted in the practical use of results from number theory and other branches of mathematics once considered to be only of theoretical interest. T 阅读全文
posted @ 2013-08-06 19:58 孔凡凯凯 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on the coasting, can only cover d distance, so an island in the sea can be covered by a radius installation 阅读全文
posted @ 2013-08-06 19:55 孔凡凯凯 阅读(220) 评论(0) 推荐(0) 编辑
摘要: Emag eht htiw Em PlehThis 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 2996.Outputaccording to input of problem 2996.Sample InputWhite: Ke1,Qd1,Ra1,Rh1,Bc1,Bf1,Nb1,a2,c2,d 阅读全文
posted @ 2013-08-06 19:51 孔凡凯凯 阅读(312) 评论(0) 推荐(0) 编辑
摘要: Help Me with the GameCrawling in process... Crawling failed 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 positions described by the input. The pieces of the w 阅读全文
posted @ 2013-08-06 17:30 孔凡凯凯 阅读(352) 评论(0) 推荐(0) 编辑