摘要:the squares thus selected sum to a number at least as high as one already chosen by the Sultan. (For those unfamiliar with the rules of chess, this im
阅读全文
摘要:It is easy to see that for every fraction in the form 1k(k > 0), we can always find two positive integersx and y, x ≥ y, such that:1k=1x+1yNow our que
阅读全文
摘要:Given a sequence of integers S = {S1, S2, . . . , Sn}, you should determine what is the value of themaximum positive product involving consecutive ter
阅读全文
摘要:An integer is divisible by 3 if the sum of its digits is also divisible by 3. For example, 3702 is divisibleby 3 and 12(3+7+0+2) is also divisible by
阅读全文
摘要:For each prefix of a given string S with N characters (each character has an ASCII code between 97 and126, inclusive), we want to know whether the pre
阅读全文
摘要:"Kronecker's Knumbers" is a little company that manufactures plastic digits for use in signs (theater marquees, gas station price displays, and so on)
阅读全文
摘要:The stores manager has sorted all kinds of goods in an alphabetical order of their labels. All the kinds having labels starting with the same letter a
阅读全文
摘要:题目描述 小明现在有一个n个数组成的数列,小明现在想取一个连续的子序列,并且这个子序列还必须得满足:最多只改变一个数,就可以使得这个连续的子序列是一个严格上升的子序列,小明想知道这个连续子序列最长的长度是多少。 题目描述 小明现在有一个n个数组成的数列,小明现在想取一个连续的子序列,并且这个子序列还
阅读全文
摘要:A Communist regime is trying to redistribute wealth in a village. They have have decided to sit everyone around a circular table. First, everyone has
阅读全文
摘要:题目: Some of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because there is n
阅读全文
摘要:The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of
阅读全文
摘要:In ``Hangman Judge,'' you are to write a program that judges a series of Hangman games. For each game, the answer to the puzzle is given as well as th
阅读全文
摘要:#include #include #include #include #define maxn 150 using namespace std; char mapn[maxn][maxn]; int main() { char str[150]; while(gets(str)!=NULL) { int sum; for(int i=0;...
阅读全文
摘要:Everybody sit down in a circle. Ok. Listen to me carefully.“Woooooo, you scwewy wabbit!”Now, could someone tell me how many words I just said?InputInp
阅读全文