随笔分类 - BestCoder
摘要:Problem Description:GTY hasngay friends. To manage them conveniently, every morning he ordered all his gay friends to stand in a line. Every gay frien...
阅读全文
摘要:Problem Description:FFZ's birthday is coming. GTY wants to give a gift to ZZF. He asked his gay friends what he should give to ZZF. One of them said, ...
阅读全文
摘要:Problem Description:Following is the recursive definition of Fibonacci sequence:Fi=⎧⎩⎨01Fi−1+Fi−2i = 0i = 1i > 1Now we need to check whether a number ...
阅读全文
摘要:Problem Description:Can we divided a given string S into three nonempty palindromes?Input:First line contains a single integerT≤20which denotes the nu...
阅读全文
摘要:Problem Description:In reward of being yearly outstanding magic student, Harry gets a magical computer. When the computer begins to deal with a proces...
阅读全文
摘要:Problem Description:NPY is learning arithmetic progression in his math class. In mathematics, an arithmetic progression (AP) is a sequence of numbers ...
阅读全文
摘要:Problem Description:f(n)=(∏i=1nin−i+1)%1000000007You are expected to write a program to calculate f(n) when a certain n is given.Input:Multi test case...
阅读全文
摘要:Problem Description:John has several lines. The lines are covered on the X axis. Let A is a point which is covered by the most lines. John wants to kn...
阅读全文
摘要:Problem Description:Here has an function:f(x)=|a∗x3+b∗x2+c∗x+d|(L≤x≤R)Please figure out the maximum result of f(x).Input:Multiple test cases(less than...
阅读全文
摘要:Problem Description:One day, Dudu, the most clever boy, heard of ACM/ICPC, which is a very interesting game. He wants to take part in the game. But as...
阅读全文
摘要:Problem Description:Consider the problem of tiling an n×n chessboard by polyomino pieces that are k×1 in size; Every one of the k pieces of each polyo...
阅读全文
摘要:Problem Description:In computer science, the longest increasing subsequence problem is to find a subsequence of a given sequence in which the subseque...
阅读全文
摘要:Problem Description:As we all know, Harry Porter learns magic at Hogwarts School. However, learning magical knowledge alone is insufficient to become ...
阅读全文
摘要:Problem Description:You have an array consisting of n integers:a1=1,a2=2,a3=3,…,an=n. Then give you m operators, you should process all the operators ...
阅读全文
摘要:Problem Description:As you know, when you want to hack someone's program, you must submit your test data. However sometimes you will submit invalid da...
阅读全文
摘要:Problem Description:You are given a string S consisting of lowercase letters, and your task is counting the number of substring that the number of eac...
阅读全文
摘要:Problem Description:In arithmetic and computer programming, the extended Euclidean algorithm is an extension to the Euclidean algorithm, which compute...
阅读全文
摘要:Problem Description:Read the program below carefully then answer the question.#pragma comment(linker, "/STACK:1024000000,1024000000")#include #include...
阅读全文
摘要:Problem Description:As a unicorn, the ability of using magic is the distinguishing feature among other kind of pony. Being familiar with composition a...
阅读全文
摘要:Problem Description:Goffi is doing his math homework and he finds an equality on his text book:gcd(n−a,n)×gcd(n−b,n)=n^k.Goffi wants to know the numbe...
阅读全文