Description A knight jumps around an infinite chessboard. The chessboard is an unexplored territory. In the spirit of explorers, whoever stands on a square for the first time claims the ownership of this square. The knight initially owns the square he stands, and jumps $N$ times before he gets bored. Recall that a knight can jump in 8 directions. Each direction consists of two squares forward and then one squaure
Time limit : 2sec / Memory limit : 256MB You are given a string $S$ consisting of 0 and 1. Find the maximum integer $K$ not greater than $|S|$ such that we can turn all the characters of $S$ into 0 by repeating the following operation some number of times. Choose a contiguous segment $[l,r]$ in $S$ whose length is at least $K$ (that is,$r-l+1\geq K$ must be satisfied). For
Time Limit: 2000⁄1000 MS (Java/Others) Problem The structure of the computer room in Northeastern University is pretty miraculous. There are $n$ servers, some servers connect to the gateway whose $IP$ address is $0$ directly. All servers are connected with each other by $n$ netting twines. It is said that this structure is favorable for maintaining physical problem of servers. But because of an unexpected rainstorm, the