Rabbit Kingdom Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3360 Accepted Submission(s): 1135 题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=4777 Problem Description Long long ago, there w…
The Cow Prom Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 1451 Accepted: 922 Description The N (2 <= N <= 10,000) cows are so excited: it's prom night! They are dressed in their finest gowns, complete with corsages and new shoes. T…
Problem Description Now you are back,and have a task to do: Given you a string s consist of lower-case English letters only,denote f(s) as the number of distinct sub-string of s. And you have some query,each time you should calculate f(s[l...r]), s[l…
问题1 用来测试的,就不说了 问题2:中位数附近2k+1个数 给出一串整型数 a1,a2,...,an 以及一个较小的常数 k,找出这串数的中位数 m 和最接近 m 的小于等于 m 的 k 个数,以及最接近 m 的大于等于 m 的 k 个数.将这 2k+1 个数按升序排序后输出. 中位数定义:如果数串的大小是偶数 2j,中位数是从小到大排列的第 j 个数:如果数串的大小是奇数 2j+1,中位数是从小到大排列的第 j+1 个数. 输入 第一行是 k 的值和数串的长度 n. 第二行是以空格隔开的 n…