Stock Exchange (最大上升子子串)】的更多相关文章

/* 题意: 给定L个整数A1,A2,...,An,按照从左到右的顺序选出尽量多的整数, 组成一个上升序列(子序列可以理解为:删除0个或者多个数,其他的数的吮吸不变). 例如,1,6,2,3,7,5,可以选出上升子序列1,2,3,5,也可以选出1,6,7, 但前者更长,选出的上升子序列中相邻元素不能相等. 思路: 开辟一个栈,每次取栈顶元素s和读到的元素a做比较,如果a>s, 则加入栈: 如果a<s,则二分查找栈中的比a大的第1个数,并替换. 最后序列长度为栈的长度. */ #include&…
题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87125#problem/E 题目: Description The world financial crisis is quite a subject. Some people are more relaxed while others are quite anxious. John is one of them. He is very concerned about the…
Stock Exchange Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2954   Accepted: 1082 Description The world financial crisis is quite a subject. Some people are more relaxed while others are quite anxious. John is one of them. He is very…
http://poj.org/problem?id=3903 Stock Exchange Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 5983   Accepted: 2096 Description The world financial crisis is quite a subject. Some people are more relaxed while others are quite anxious. J…
E - LIS Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u   Description The world financial crisis is quite a subject. Some people are more relaxed while others are quite anxious. John is one of them. He is very concerned a…
POJ 3903    Stock Exchange  (E - LIS 最长上升子序列) 题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87125#problem/E 题目: Description The world financial crisis is quite a subject. Some people are more relaxed while others are quite anxious. John…
转载请注明出处:http://blog.csdn.net/u012860063 题目链接:id=3903">http://poj.org/problem?id=3903 Description The world financial crisis is quite a subject. Some people are more relaxed while others are quite anxious. John is one of them. He is very concerned…
题目地址:http://poj.org/problem?id=3903 题目: Description The world financial crisis is quite a subject. Some people are more relaxed while others are quite anxious. John is one of them. He is very concerned about the evolution of the stock exchange. He fo…
一.Description The world financial crisis is quite a subject. Some people are more relaxed while others are quite anxious. John is one of them. He is very concerned about the evolution of the stock exchange. He follows stock prices every day looking f…
POJ3903 Stock Exchange #include <iostream> #include <cstdio> #include <vector> #include <algorithm> using namespace std; ; int a[maxn]; int main() { int n; while (~scanf("%d",&n)) { ; i <= n; ++i) scanf("%d&qu…