04 2019 档案
摘要:Alice and Bob are playing game of Misère Nim. Misère Nim is a game playing on k piles of stones, each pile containing one or more stones. The players
阅读全文
摘要:Nim游戏的概述: 还记得这个游戏吗?给出n列珍珠,两人轮流取珍珠,每次在某一列中取至少1颗珍珠,但不能在两列中取。最后拿光珍珠的人输。后来,在一份资料上看到,这种游戏称为“拈(Nim)”。据说,它源自中国,经由被贩卖到美洲的奴工们外传。辛苦的工人们,在工作闲暇之余,用石头玩游戏以排遣寂寞。后来流传
阅读全文
摘要:David has a white board with 2×N2 \times N2×N grids.He decides to paint some grids black with his brush.He always starts at the top left corner and en
阅读全文
摘要:Give a string SSS and NNN string TiT_iTi , determine whether TiT_iTi is a subsequence of SSS. If ti is subsequence of SSS, print YES,else print NO.
阅读全文
摘要:Problem Description Taotao is glad to see that lots of students have registered for today's algorithm competition. Thus he wants to pull a banner on t
阅读全文
摘要:DreamGrid City is a city with intersections arranged into a grid of rows and columns. The intersection on the -th row and the -th column can be descri
阅读全文
摘要:Edward, the emperor of the Marjar Empire, wants to build some bidirectional highways so that he can reach other cities from the capital as fast as pos
阅读全文
摘要:Last week, n students participated in the annual programming contest of Marjar University. Students are labeled from 1 to n. They came to the competit
阅读全文
摘要:In mathematics, a polygonal number is a number represented as dots or pebbles arranged in the shape of a regular polygon. The dots are thought of as a
阅读全文
摘要:Description It's easy for ACMer to calculate A^X mod P. Now given seven integers n, A, K, a, b, m, P, and a function f(x) which defined as following.
阅读全文
摘要:A sequence of integers is called a peak, if and only if there exists exactly one integer such that , and for all , and for all . Given an integer sequ
阅读全文
摘要:Description Once ago, there is a mystery yard which only produces three kinds of apples. The number of each kind is infinite. A girl carrying a big ba
阅读全文
摘要:Bear Limak examines a social network. Its main functionality is that two members can become friends (then they can talk with each other and share funn
阅读全文

浙公网安备 33010602011771号