摘要: 例题 n的范围是1e5,时间限定1s 如果使用vector+count(g.begin(),g.end(),x),时间复杂度应该是o(n*n) 因为vector是无序的,查找的复杂度应该是o(n) 如果使用set+set.count(val),复杂度o(n*logn) 因为set有序,使用二分查找 阅读全文
posted @ 2020-07-31 19:56 特立独行的猪猪 阅读(262) 评论(0) 推荐(0) 编辑