Just A String Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 643 Accepted Submission(s): 182 Problem Descriptionsoda has a random string of length n which is generated by the following alg…
排列组合 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3438 Accepted Submission(s): 1439 Problem Description 有n种物品,并且知道每种物品的数量.要求从中选出m件物品的排列数.例如有两种物品A,B,并且数量都是1,从中选2件物品,则排列有"AB","BA&…
大一上学完数分上后终于可以搞懂指数型母函数了.. 需要一点关于泰勒级数的高数知识 题目在此: "红色病毒"问题 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4407 Accepted Submission(s): 1831 Problem Description 医学界发现的新病毒因其蔓延速度和Internet上传播…
#include<cstdio> #include<cstring> using namespace std; int n,m,jiecheng[11]; double a[12],b[12]; int main() { //freopen("hdu1521.in","r",stdin); int x; jiecheng[0]=1; for(int i=1;i<=10;++i) jiecheng[i]=jiecheng[i-1]*i;…
排列组合 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4891 Accepted Submission(s): 2122 Problem Description 有n种物品,并且知道每种物品的数量.要求从中选出m件物品的排列数.例如有两种物品A,B,并且数量都是1,从中选2件物品,则排列有"AB","BA&q…
hdu 3553 Just a String (后缀数组) 题意:很简单,问一个字符串的第k大的子串是谁. 解题思路:后缀数组.先预处理一遍,把能算的都算出来.将后缀按sa排序,假如我们知道答案在那个区间范围内了(假设为[l,r]),那么我们算下这个区间内的lcp的最小值(设最小值的位置为mid,大小为x),如果x*(r-l+1)>=k,那么,答案就是这个区间的lcp的最小值的某一部分(具体是哪一部分,画个图稍微算下就出来了).如果x * ( r - l + 1 ) < k 那么我们分两种情况…
关于指数型母函数的题目,通过用公式并展开得到系数做的吧,取最后两位就是对100取模 #include<stdio.h> int QuickPow(int a,long long n,int p){ ; while(n){ )ans=ans*temp%p; n>>=; temp=temp*temp%p; } return ans; } int main(){ int T; ){ ;q<=T;q++){ long long N; int ans; scanf("%I64…
Count the string Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 8845 Accepted Submission(s): 4104 Problem Description It is well known that AekdyCoin is good at string problems as well as n…
Lweb and String 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5842 Description Lweb has a string S. Oneday, he decided to transform this string to a new sequence. You need help him determine this transformation to get a sequence which has the longe…
Problem Description We all know that Bin-Laden is a notorious terrorist, and he has disappeared for a long time. But recently, it is reported that he hides in Hang Zhou of China! "Oh, God! How terrible! " Don't be so afraid, guys. Although he hi…
Lweb and String 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5842 Description Lweb has a string S. Oneday, he decided to transform this string to a new sequence. You need help him determine this transformation to get a sequence which has the longe…
It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-empty prefixes of this string. For example: s: "abab" The prefixes are: "a", "ab&…
Victor and String Time Limit: 1000ms Memory Limit: 262144KB This problem will be judged on HDU. Original ID: 542164-bit integer IO format: %I64d Java class name: Main Victor loves to play with string. He thinks a string is charming as the string…
传送门 Fxx and string Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 1007 Accepted Submission(s): 422 Description Problem DescriptionYoung theoretical computer scientist Fxx get a string which…