上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 29 下一页
摘要: This is a two player game. Initially there areninteger numbers in an array and playersAandBget chance to take them alternatively. Each player can take... 阅读全文
posted @ 2014-04-29 13:22 Oyking 阅读(207) 评论(0) 推荐(0) 编辑
摘要: DescriptionLetxandybe two strings over some finite alphabetA. We would like to transformxintoyallowing only operations given below:Deletion:a letter i... 阅读全文
posted @ 2014-04-28 23:00 Oyking 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 1、AC自动机 1 void buildTrie(Node *root, char *str){ 2 Node *p = root; 3 for(int i = 0; str[i]; ++i){ 4 int index = str[i] - '0'; ... 阅读全文
posted @ 2014-04-21 11:33 Oyking 阅读(221) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionThere is a piece of grids land of size n×m. Chandler and his team take responsibility to guard it. There are some searchlights on some pieces and each of them has a capability to lighten a distance towards four directions: north, south, east and west. Different searchlight ha 阅读全文
posted @ 2014-04-07 18:32 Oyking 阅读(408) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionRompire is a robot kingdom and a lot of robots live there peacefully. But one day, the king of Rompire was captured by human beings. His thinking circuit was changed by human and thus became a tyrant. All those who are against him were put into jail, including our clever Micheal#1 阅读全文
posted @ 2014-04-06 22:32 Oyking 阅读(331) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionJosh Lyman is a gifted painter. One of his great works is a glass painting. He creates some well-designed lines on one side of a thick and polygonal glass, and renders it by some special dyes. The most fantastic thing is that it can generate different meaningful paintings by rotat 阅读全文
posted @ 2014-04-06 18:07 Oyking 阅读(408) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionCity C is really a nightmare of all drivers for its traffic jams. To solve the traffic problem, the mayor plans to build a RTQS (Real Time Query System) to monitor all traffic situations. City C is made up of N crossings and M roads, and each road connects two crossings. All roads 阅读全文
posted @ 2014-04-04 20:45 Oyking 阅读(468) 评论(0) 推荐(0) 编辑
摘要: DescriptionLittle Y finds there is a very interesting formula in mathematics:XYmod Z = KGivenX,Y,Z, we all know how to figure outKfast. However, givenX,Z,K, could you figure outYfast?InputInput data consists of no more than 20 test cases. For each test case, there would be only one line containing 3 阅读全文
posted @ 2014-03-29 23:27 Oyking 阅读(327) 评论(0) 推荐(0) 编辑
摘要: DescriptionGiven a prime P, 2 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 typedef long long LL; 8 9 const int SIZEH = 65537;10 11 struct hash_map {12 int head[SIZEH], size;13 int next[SIZEH];14 LL state[SIZEH], val[SIZEH];15 16 void init() {17 m... 阅读全文
posted @ 2014-03-28 21:29 Oyking 阅读(523) 评论(0) 推荐(0) 编辑
摘要: DescriptionProf. Kaykobad has given Nasa the duty of buying some food for the ACM contestents. Nasa decided to buyndifferent items. He then asked each of themcontestents how much of each item they want to eat. They could not give any logical answer, they only want as much as they wish! Nasa knows qu 阅读全文
posted @ 2014-03-26 00:30 Oyking 阅读(884) 评论(2) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 29 下一页