当前位置:网站首页>Dynamic planning -- expansion topics
Dynamic planning -- expansion topics
2022-07-03 18:47:00 【Lin Shiliu should work hard】
1. Longest ascending subsequence
Interceptor missile issue
For a sequence , seek At least how many ascending sequences can cover
p[i] It means the first one i The maximum number of ascending sequences ,p[i]<p[i+1]
Each time a sequence larger than the maximum number is found , Then update the maximum number
If you can't find it , Just restart a new ascending sequence
for(int i=1;i<=n;i++)
{
int k=0;
while(k<cnt&&p[k]<a[i]) k++;
p[k]=a[i];
if(k>=cnt) cnt++;
}
cout<<res<<endl<<cnt;Missile intercept plus
187. Missile defense system - AcWing Question bank
The interception sequence can be strictly increasing or decreasing , Ask how many can be covered
Put each number on the rise / Descending sequence
边栏推荐
- Compose LazyColumn 顶部添加控件
- There are several levels of personal income tax
- Sensor debugging process
- 2022-2028 global scar care product industry research and trend analysis report
- Sqlalchemy - subquery in a where clause - Sqlalchemy - subquery in a where clause
- Suffix derivation based on query object fields
- Transformer T5 model read slowly
- Opencv learning notes (continuously updated)
- Administrative division code acquisition
- English grammar_ Adjective / adverb Level 3 - multiple expression
猜你喜欢

235. 二叉搜索树的最近公共祖先【lca模板 + 找路径相同】

Shell script return value with which output

English grammar_ Adjective / adverb Level 3 - multiple expression

我眼中真正优秀的CTO长啥样

Does SQL always report foreign key errors when creating tables?

Win 11 major updates, new features love love.

Unity webgl optimization

Ping problem between virtual machine and development board

CTO and programmer were both sentenced for losing control of the crawler

How to analyze the rising and falling rules of London gold trend chart
随机推荐
2022-2028 global plasmid DNA cdmo industry research and trend analysis report
Torch learning notes (7) -- take lenet as an example for dataload operation (detailed explanation + reserve knowledge supplement)
我眼中真正优秀的CTO长啥样
A green plug-in that allows you to stay focused, live and work hard
Raft 日志复制
What problems can cross-border e-commerce sellers solve with multi platform ERP management system
PHP determines which constellation it belongs to today
php-fpm的max_chindren的一些误区
Administrative division code acquisition
[Yu Yue education] world reference materials of Microbiology in Shanghai Jiaotong University
webcodecs
编程中常见的 Foo 是什么意思?
CTO and programmer were both sentenced for losing control of the crawler
Torch learning notes (2) -- 11 common operation modes of tensor
Ping problem between virtual machine and development board
Torch learning notes (4) -- torch's dynamic calculation diagram
Scrapy爬虫框架
Briefly describe the quantitative analysis system of services
[combinatorics] exponential generating function (properties of exponential generating function | exponential generating function solving multiple set arrangement)
SSH 远程执行命令简介