Sequence Problem Description Let us define a sequence as below f1=A f2=B fn=C*fn-2+D*fn-1+[p/n] Your job is simple, for each task, you should output Fn module 109+7. Input The first line has only one integer T, indicates the number of tasks. Then,…
题目描述 Let us define a sequence as belowYour job is simple, for each task, you should output Fn module 109+7. 输入 The first line has only one integer T, indicates the number of tasks.Then, for the next T lines, each line consists of 6 integers, A , B, C…
Hard challenge Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 1487 Accepted Submission(s): 352 Problem Description There are n points on the plane, and the ith points has a value vali, an…
Kolakoski Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 0 Accepted Submission(s): 0 Problem Description This is Kolakosiki sequence: 1,2,2,1,1,2,1,2,2,1,2,2,1,1,2,1,1,2,2,1--. This seque…
Euler theorem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 0 Accepted Submission(s): 0 Problem Description HazelFan is given two positive integers a,b, and he wants to calculate amodb.…