摘要:Function The shorter, the simpler. With this problem, you should be convinced of this truth. You are given an array AA of NN postive integers, and MM
阅读全文
摘要:Best Solver The so-called best problem solver can easily solve this problem, with his/her childhood sweetheart. It is known that y=(5+26–√)1+2xy=(5+26
阅读全文
摘要:Find a path Frog fell into a maze. This maze is a rectangle containing NN rows and MM columns. Each grid in this maze contains a number, which is call
阅读全文
摘要:Do you know what is called ``Coprime Sequence''? That is a sequence consists of nnpositive integers, and the GCD (Greatest Common Divisor) of them is
阅读全文
摘要:Harmonic Number In mathematics, the nth harmonic number is the sum of the reciprocals of the first n natural numbers: In this problem, you are given n
阅读全文
摘要:Palindrome Function As we all know,a palindrome number is the number which reads the same backward as forward,such as 666 or 747.Some numbers are not
阅读全文
摘要:Rikka with Nash Equilibrium Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 1460 Accepted Subm
阅读全文
摘要:方格取数 设有N*N的方格图(N<=10),我们将其中的某些方格中填入正整数,而其他的方格中则放人数字0。如下图所示(见样例 ,黄色和蓝色分别为两次走的路线,其中绿色的格子为黄色和蓝色共同走过的): A B 某人从图的左上角的A点出发,可以向下行走,也可以向右走,直到到达右下角的B 点。在走过的路上
阅读全文
摘要:#include #define MAX 100005 using namespace std; typedef long long ll; char W[MAX],T[MAX]; int nxt[MAX]; void getnext(int lenW) { int i=0,j=-1; nxt[i]=-1; while(i<lenW) { if(j...
阅读全文
摘要:I Count Two Three 31.1% 1000ms 32768K I will show you the most popular board game in the Shanghai Ingress Resistance Team. It all started several mont
阅读全文
摘要:Herbs Gathering 10.76% 1000ms 32768K Collecting one's own plants for use as herbal medicines is perhaps one of the most self-empowering things a perso
阅读全文
摘要:D. The Wu time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output D. The Wu time limit per test
阅读全文
摘要:Problem J. Let Sudoku Rotate Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 0 Accepted Submiss
阅读全文