好巧 我 TLE on #29 /kk
by Powerless233 @ 2022-08-12 20:50:33
@[Meteorshower_Y](/user/239164) 你火车头啥的全加上试试
by Y2y7m @ 2022-08-12 20:52:14
@[Meteorshower_Y](/user/239164)
前面的点挂好像是空间开小了,开大一点试试
by Powerless233 @ 2022-08-12 20:54:56
@[Y2y7m](/user/377440) 已经试过了
by Meteorshower_Y @ 2022-08-12 21:13:54
@[Powerless233](/user/347086) 4e5(线段树再乘个4)也不够吗QwQ
by Meteorshower_Y @ 2022-08-12 21:14:58
QAQ (
by Meteorshower_Y @ 2022-08-12 21:16:28
@[Powerless233](/user/347086) MAXN = 1e6 也不可以
by Meteorshower_Y @ 2022-08-12 21:20:40
@[Meteorshower_Y](/user/239164) `query_min()` 里的单点查询就不要用线段树了啊...直接访问数组呗
by LordLaffey @ 2022-08-12 21:28:35
@[LordLaffey](/user/335136) Fixed, But Also Tle #19
by Meteorshower_Y @ 2022-08-12 21:36:39
TLE 原因 `lower_bound` 用了 `std::lower_bound(__first,__last,val)` 而不是 `multiset<T>::lower_bound(val)`.
`lower_bound`的时间复杂度直接从 $\log(n)$ 飙升到 $n\log(n)$ ,总时间复杂度 $n^2\log(n)$
by Meteorshower_Y @ 2022-08-12 22:40:32