Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

关于STL的速度比较

Posted by 14020130063 at 2016-01-22 23:26:10 on Problem 1655
用STL里的list存图如果TLE了,可以试一下用vector。
我两个代码几乎一样,一个用vector125ms,用list就TLE。。
感觉list增删里的指针操作比较多再加上迭代器的使用估计会慢,vector虽然会不时移动数据但是可以证明他操作次数总共不超过2n。。
不过vector貌似不能减小capacity所以可能MLE。。
渣渣的一点点体会。。

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator