标签:mod splay 它的 queue 雷达 阶段 map tput span
先吐槽一句!九度关了!!!!!!!!我的账号密码竟然不对了。。。。
Description
Input
Output
Sample Input
Sample Output
求最长不降序列
//Asimple #include <iostream> #include <sstream> #include <algorithm> #include <cstring> #include <cstdio> #include <vector> #include <cctype> #include <cstdlib> #include <stack> #include <cmath> #include <set> #include <map> #include <string> #include <queue> #include <limits.h> #include <time.h> #define INF 0x7fffffff #define mod 123456 #define swap(a, b, t) t = a, a = b, b = t using namespace std; const int maxn = 1001; int dx[]={0,0,1,-1}, dy[]={1,-1,0,0}; typedef long long ll; ll n, m, num, T; //char str[maxn]; //string s[maxn], s1, s2; ll a[maxn]; int main(){ while( cin >> n ){ int Max = 0; int cnt = 0; for(int i=0; i<n; i++) { cin >> a[i]; } while( true ) { bool f = false; int Max = 30000+1; for(int i=0; i<n; i++) { if( a[i] > 0 && a[i]<=Max) { Max = a[i]; a[i] = -1; f = true; } } if( f ) cnt ++ ; else break; } cout << cnt << endl; } return 0; }
标签:mod splay 它的 queue 雷达 阶段 map tput span
原文地址:http://www.cnblogs.com/Asimple/p/6067566.html