Bellovin Time Limit: / MS (Java/Others) Memory Limit: / K (Java/Others) Total Submission(s): Accepted Submission(s): Problem Description Peter has a sequence a1,a2,...,an and he define a function on the sequence -- F(a1,a2,...,an)=(f1,f2,...,fn), whe…
Longest Ordered Subsequence Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 33943 Accepted: 14871 Description A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence (a1, a2, ...…
首先这种做法只能针对稀疏序列, 比如这种情况: abc abacabc. 会输出5 ,,,,就比较尴尬, #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> #define lli long long int using namespace std; ; const int maxn=0x3f; void read(in…