If any like me get this error while importing the Pbds in #includes..
I got error importing this -> #include<ext/pb_ds/assoc_container.hpp> Error was "cannot open source file hash_standard_resize_policy_imp.hpp ".
Fix go to the dir -> C:\MinGW\lib\gcc\mingw32\8.2.0\include\c++\ext\pb_ds\detail\resize_policy
There u will see a file similar to -> "hash_standard_resize_policy_imp.hpp0000644"
Rename it to hash_standard_resize_policy_imp.hpp
and now it worked for me .
I don't know the real reason why the file was weirdly name before if someone knows plz comment down below and tell.
Hope this helps.
Worked for me.
Thanks, worked for me...
You are a life saver!!!Worked for windows 10..
I had been avoiding the hassle of trying to get pbds to work, but it seems like it's this simple! Yay!
Thank you !! Thank you !! Inthakanna em cheppagalam..
Is this Tamil? Or maybe it's Telugu (looks similar but I can't understand it lol).
Yes it is certainly weird given the fact that they didn't rectified this error for i don't know how long , seems like every version of gcc comes with file like this, or maybe it's not an error at all :|
Probably the most useful post i've read in a while on codeforces!
Thank you, now i don't have to use the custom invocation tab whenever i use pb_ds.
Thankyou so much
Thanks , It really helped
Worked for me too ... really saved my time !!
Worked for me too! Thanks! IDK what's holding the provider from fixing this. Gave me a headache for almost half an hour...until I came across THIS magical post :D
It is not working in windows 10. Is there any other solution for this.
it is working for me (i m also using windows 10).
Can u pls share your error ss?
It was not working for me too. Then I installed the latest gcc version.
Can you share how can i install latest gcc version. In my case gcc version is 6.3 .
.
This not the latest version. gcc 12.2 is the latest. I currently have 11.2.0. Just google how to install ... You'll find the steps.
oh sorry mine was 6.3 and it worked fine so i got confused.
Hey, Can anyone clear my doubt please. If I use my pbds as a mutliset and I want to find the number of elements which are smaller than than any element, is it possible to solve this using pbds?
yes, it is possible you can do that.
I tried it order of key but it gives me the total number of distinct elements less than a element but I want to find the total number of elements smaller than my number. For example, in the pbds with elements 1 2 2 2 4, If I use order of key for element 4, it will give an output of 2 but I want to find a way so that the output would be 4.
for set:- #define order_set tree<int, null_type,less, rb_tree_tag,tree_order_statistics_node_update>
for multiset:- #define order_set tree<int, null_type,less_equal, rb_tree_tag,tree_order_statistics_node_update>
you have to use less_equal instead of less in syntax to make it work as a multiset. order_of_key will give correct in the second case
Thanks it worked for me
Thanks, Worked for me :)
Thanks brother, it works.
it's worked for me thankyou
worked for me :)
Thanks a lot . It works for me
Thanks a lot worked for me
GOD !!!!!
Love you brother