题目链接 Problem Description Steph is extremely obsessed with "sequence problems" that are usually seen on magazines: Given the sequence 11, 23, 30, 35, what is the next number? Steph always finds them too easy for such a genius like himself until o…
题目链接 Problem Description Give an array A, the index starts from 1. Now we want to know Bi=maxi∤jAj , i≥2. Input The first line of the input gives the number of test cases T; T test cases follow. Each case begins with one line with one integer n : the…
题目链接 Problem Description In mathematics, the function d(n) denotes the number of divisors of positive integer n. For example, d(12)=6 because 1,2,3,4,6,12 are all 12's divisors. In this problem, given l,r and k, your task is to calculate the followin…
题目链接 Problem Description Give you an array A[1..n]of length n. Let f(l,r,k) be the k-th largest element of A[l..r]. Specially , f(l,r,k)=0 if r−l+1<k. Give you k , you need to calculate ∑nl=1∑nr=lf(l,r,k) There are T test cases. 1≤T≤10 k≤min(n,80) A[…
题目链接 Problem Description There is a tree with n nodes, each of which has a type of color represented by an integer, where the color of node i is ci. The path between each two different nodes is unique, of which we define the value as the number of di…
题目链接 Problem Description In ACM/ICPC contest, the ''Dirt Ratio'' of a team is calculated in the following way. First let's ignore all the problems the team didn't pass, assume the team passed X problems during the contest, and submitted Y times for t…
题目链接 Problem Description At Valentine's eve, Shylock and Lucar were enjoying their time as any other couples. Suddenly, LSH, Boss of FFF Group caught both of them, and locked them into two separate cells of the jail randomly. But as the saying goes:…
题目链接 Problem Description Giving two strings and you should judge if they are matched. The first string contains lowercase letters and uppercase letters. The second string contains lowercase letters, uppercase letters, and special symbols: "." an…
题目链接 Problem Description The Eternal Fleet was built many centuries ago before the time of Valkorion by an unknown race on the planet of Iokath. The fate of the Fleet's builders is unknown but their legacy would live on. Its first known action was in…
题目链接 Problem Description The Death Star, known officially as the DS-1 Orbital Battle Station, also known as the Death Star I, the First Death Star, Project Stardust internally, and simply the Ultimate Weapon in early development stages, was a moon-si…