为什么lower_bound只有104分?

P1020 [NOIP1999 提高组] 导弹拦截

```cpp #include<iostream> #include<algorithm> //定义INF>50000 #define INF 50001 using namespace std; int main(void) { int a[100010],i=0; while(cin>>a[i]) i++; int stack[100010]; fill(stack,stack+i,INF);//把stack初始化为INF for(int j=i-1;j>=0;j--)//先倒着找最长递增子序列 *lower_bound(stack,stack+i,a[j])=a[j]; cout<<lower_bound(stack,stack+i,INF)-stack<<endl; fill(stack,stack+i,INF);//再初始化 for(int j=0;j<i;j++)//再顺着找一遍 *lower_bound(stack,stack+i,a[j])=a[j]; cout<<lower_bound(stack,stack+i,INF)-stack; return 0; } ```
by Walker011 @ 2018-02-01 20:05:26


最长不下降子序列?
by ylxmf2020 @ 2018-02-01 20:12:58


最长不下降???
by Zenurik @ 2018-02-03 09:55:43


|