When i solved this problem by taking vector<int arr(87000008,0),time limit exceeded came but when i used vector<bool arr(87000008,false) it got accepted in 0.76 time.
Also i found on net that in some cases vector is faster than vector.
What’s the reason behind this.
Plz enlighten me.
Which is faster?
- Vector bool
- Vector int
- Depends on the situation.
3voters
Votes are public.
created
last reply
- 2
replies
- 426
views
- 2
users
- 1
link