第六周 10.5---10.11
2015-10-07 11:15
477 查看
---------10.5
好几天没写了---
是今天(10.7)补的---
弱校联萌第五天
poj 3573 I18n
一神教的办法>_<
View Code
今天好颓啊--
今天天气好好啊-----
滚了---------
---------10.9
补了那天cf 的E
---------10.10
忘记在干嘛了
颓---爆---了------
---------10.11
ZOJ月赛
好几天没写了---
是今天(10.7)补的---
弱校联萌第五天
poj 3573 I18n
一神教的办法>_<
#include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #include<vector> using namespace std; const int maxn = 100005; int a[maxn],f[maxn]; int n; void solve(){ memset(f,0,sizeof(f)); int len = 1; f[1] = a[1]; for(int i = 2;i <= n;i++){ if(a[i] >= f[len]) f[++len] = a[i]; else{ int pos = upper_bound(f+1,f+len+1,a[i])-f; f[pos] = a[i]; } } printf("%d\n",len); } int main(){ while(scanf("%d",&n) != EOF){ for(int i = 1;i <= n;i++) scanf("%d",&a[i]); solve(); } return 0; }
View Code
今天好颓啊--
今天天气好好啊-----
滚了---------
---------10.9
补了那天cf 的E
---------10.10
忘记在干嘛了
颓---爆---了------
---------10.11
ZOJ月赛
相关文章推荐
- POJ 2914 Minimum Cut
- Video-No.03 韩顺平_MySQL优化
- MySQL常用函数
- 反编译 轻松调频 Android APP 下载“飞鱼秀”录音
- LeetCode Same Tree
- VMware Workstation创建虚拟机
- Codeforces Round #324 (Div. 2) B. Kolya and Tanya 快速幂
- ZH奶酪:PHP抓取网页方法总结
- 从零自学Hadoop(07):Eclipse插件
- [Lintcode] Binary Tree Maximum Path Sum
- 持续更新:Centos常用方便的命令与技巧集合
- JavaScript数组
- ProgressBar自定义样式
- 李莫愁:耐得住寂寞才能守得住繁华(转自微信)
- 深入思考
- maven常用命令
- FormCollection的用法
- 无氧间歇家庭瘦身(chinafitter)
- 视频Android studio1.3.1从菜鸟到高手--第一季-IT蓝豹
- 深入Java集合学习系列:深入CopyOnWriteArraySet