下载链接,详解链接

 


标题链接:http://ac.jobdu.com/problem.php?pid=1131

ONE v3.5.0 此前版本:API
链接

详解链接:https://github.com/zpfbuaa/JobduInCPlusPlus

博客: http://blog.csdn.net/ziwang\_/article/details/61614910

参考代码:

作者: jokerZ

//
//  1131 合唱队形.cpp
//  Jobdu
//
//  Created by PengFei_Zheng on 24/04/2017.
//  Copyright © 2017 PengFei_Zheng. All rights reserved.
//

#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <string.h>
#include <cmath>
#define MAX_SIZE 101

using namespace std;

int n;
int height[MAX_SIZE];
int l2r[MAX_SIZE];
int r2l[MAX_SIZE];

int main(){
    while(scanf("%d",&n)!=EOF){
        for(int i = 0 ; i < n ; i ++){
            scanf("%d",&height[i]);
            l2r[i]=1;
            r2l[i]=1;
        }
        for(int i = 0 ; i < n ; i++){
            for(int j = 0 ; j < i ; j++){
                if(height[i]>height[j]){
                    l2r[i]=max(l2r[i],l2r[j]+1);
                }
            }
        }
        for(int i = n-1 ; i >=0 ; i--){
            for(int j = n-1 ; j > i ; j--){
                if(height[i]>height[j]){
                    r2l[i]=max(r2l[i],r2l[j]+1);
                }
            }
        }
        int ans = 1;
        for(int i = 0 ; i < n ; i ++){
            ans = max(ans,l2r[i]+r2l[i]-1);//l2r + r2l - 1 means the max number which suit ta<tb<..< tmax >...ti>tj
        }
        ans = n - ans;//find the least number need to be removed
        printf("%d\n",ans);
    }
    return 0;
}
/**************************************************************
    Problem: 1131
    User: zpfbuaa
    Language: C++
    Result: Accepted
    Time:670 ms
    Memory:1520 kb
****************************************************************/

api
链接:https://github.com/jokermonn/-Api/blob/master/MeizuWeather.md

api
链接:https://github.com/jokermonn/-Api/blob/master/ExpressDelivery100.md

花色地址: https://github.com/jokermonn/-Api


app
下载链接:http://www.paopaoche.net/android/97297.html

快递网:API 链接

One plus天气:API 链接

12306
网站链接:http://www.12306.cn/mormhweb/

图虫:API 链接

时光网:API 链接

金山词典链接:http://www.iciba.com/

途牛高铁票:API链接



app
下载链接:http://www.wandoujia.com/apps/com.ss.android.tuchong


豆子电影:API 链接

app
下载链接:http://www.wandoujia.com/apps/com.mtime


api
链接:https://github.com/jokermonn/-Api/blob/master/Eyepetizer.md

app
下载链接:http://www.wandoujia.com/apps/com.ss.android.essay.joke

app
下载链接:http://www.wandoujia.com/apps/com.douban.movie




主旨天气预告:API 链接

app
下载链接:http://www.wandoujia.com/apps/com.taguxdesign.yixi

api
链接:https://github.com/jokermonn/-Api/blob/master/DoubanMovie.md

每一日一文:API 链接

途牛火车票网链接:http://huoche.tuniu.com/


api
链接:https://github.com/jokermonn/-Api/blob/master/Tuchong.md



app
下载链接:http://www.wandoujia.com/apps/com.meiriyiwen.app

api
链接:https://github.com/jokermonn/-Api/blob/master/XiaomiWeather.md

微软必应词典:API 链接

HTC天气:API 链接


api
链接:https://github.com/jokermonn/-Api/blob/master/12306.md

api
链接:https://github.com/jokermonn/-Api/blob/master/Time.md

快递100网链接:https://www.kuaidi100.com/


api
链接:https://github.com/jokermonn/-Api/blob/master/ONEv3.5.0~.md

api
链接:https://github.com/jokermonn/-Api/blob/master/ExpressDelivery.md

api
链接:https://github.com/jokermonn/-Api/blob/master/Neihan.md

api
链接:https://github.com/jokermonn/-Api/blob/master/BingDic.md


app
下载链接(非OPPO不可安装):http://www.cr173.com/soft/264860.html

app
下载链接:http://www.wandoujia.com/apps/bingdic.android.activity

内蕴段子:API 链接


开眼 Eyepetizer:API 链接

api
链接:https://github.com/jokermonn/-Api/blob/master/CenterWeather.md

api
链接:https://github.com/jokermonn/-Api/blob/master/KingsoftDic.md

api
链接:https://github.com/jokermonn/-Api/blob/master/OneArticle.md

api
链接:https://github.com/jokermonn/-Api/blob/master/Yixi.md

快递100:API 链接

app
下载链接:http://www.wandoujia.com/apps/one.hh.oneclient

ONE v3.5.0 之后版本:API
链接

12306:API 链接


api
链接:https://github.com/jokermonn/-Api/blob/master/TuniuTickets.md

app
下载链接:http://www.wandoujia.com/apps/com.nineton.weatherforecast

一席:API 链接

app
下载链接:http://www.wandoujia.com/apps/com.wandoujia.eyepetizer

金山词典:API 链接澳门真人网上娱乐网址,

快递网链接:http://www.kuaidi.com/

api
链接:https://github.com/jokermonn/-Api/blob/master/ONE~v3.5.0.md