P1108 低价购买 最长下降子序列不用多讲:关键是方案数: 在求出f[i]时,我们可以比较前面的f[j]; 如果f[i]==f[j]&&a[i]==a[j] 要将t[j]=0,去重: 这样将所有t[j]加起来就是方案数: #include<cstdio> #include<cstring> #include<algorithm> using namespace std; ; int n; int f[maxn],t[maxn]; int a[maxn]
Beautiful People Special JudgeTime Limit: 10000/5000MS (Java/Others)Memory Limit: 128000/64000KB (Java/Others) SubmitStatisticNext Problem Problem Description The most prestigious sports club in one city has exactly N members. Each of its members is