本蒟蒻发现自己写的代码和别人近乎一致,
但是耗时却很大,经过水群(bushi),
发现了一个问题:
std::lower_bound(set.begin,set.end,num)
和
set.lower_bound(num)
差别很大。
大到什么地步呢?
使用set.lower_bound(num)跑了400ms
使用std::lower_bound(set.begin,set.end,num)跑了2208ms.
应该是底层实现的不同,导致差异这么大.
特发此贴,希望大家不要犯和我同样的错误喵QAQ