Processing math: 100%

【校内训练】Increasing

tonyfang posted @ 2016年10月26日 22:29 in 随笔 with tags C++ OI , 687 阅读

求最少改变几个数,使得序列变成最长上升子序列。

【题解】

可以修改的条件:ajaiji(j<i)ajjaii,那么把ai变为aii即可。

然后套用求LIS的nlogn方法。

 

ekhan.in 说:
2023年4月20日 19:40

Our team is made up of professional writers and citizen journalists with a wide range of journalism interests who are passionate about reporting Education Updates with transparency in the general public interest.ekhan is a group of ekhan.in professional writers who have banded together to provide devoted news coverage of current events in India. Our team is made up of professional writers and citizen journalists with a wide range of journalism interests who are passionate about reporting Education Updates with transparency in the general public interest.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter