题目链接 Problem Description Chiaki has an array of n positive integers. You are told some facts about the array: for every two elements $$$a_i$$$ and $$$a_j$$$ in the subarray $$$a_{l,r} (l ≤ i < j ≤ r )$$$, $$$a_i≠a_j$$$ holds. Chiaki would like to fi…
Game Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 184 Accepted Submission(s): 132 Problem Description Alice and Bob are playing a game.The game is played on a set of positive integers from…
题目链接 Problem Description There are $$$n$$$ intersections in Bytetown, connected with $$$m$$$ one way streets. Little $$$Q$$$ likes sport walking very much, he plans to walk for q days. On the $$$i$$$-th day, Little $$$Q$$$ plans to start walking at t…
题目链接 Problem Description Chiaki is interested in an infinite sequence $$$a_1,a_2,a_3,...,$$$ which is defined as follows: $$$a_n= \begin{cases} 1, & \text{$$$n=1,2$$$} \\ a_{n-a_{n-1}}+a_{n-1-a_{n-2}} & \text{$$$n\ge 3$$$} \end{cases}$$$ Chiaki wo…
题目链接 Problem Description In a galaxy far, far away, there are two integer sequence a and b of length n. b is a static permutation of 1 to n. Initially a is filled with zeroes. There are two kind of operations: 1.add l r: add one for $$$a_l, a_{l+1}..…