Noob-ita-coder's blog

By Noob-ita-coder, history, 7 years ago, In English

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.

  • Vote: I like it
  • +17
  • Vote: I do not like it

| Write comment?
»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Worked for me.

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Thanks, worked for me...

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

You are a life saver!!!Worked for windows 10..

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I had been avoiding the hassle of trying to get pbds to work, but it seems like it's this simple! Yay!

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Thank you !! Thank you !! Inthakanna em cheppagalam..

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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 :|

»
6 years ago, hide # |
 
Vote: I like it -6 Vote: I do not like it

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.

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Thankyou so much

»
5 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Thanks , It really helped

»
5 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Worked for me too ... really saved my time !!

»
4 years ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

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

»
3 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

It is not working in windows 10. Is there any other solution for this.

»
3 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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?

  • »
    »
    3 years ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    yes, it is possible you can do that.

    • »
      »
      »
      3 years ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      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.

      • »
        »
        »
        »
        3 years ago, hide # ^ |
        Rev. 3  
        Vote: I like it 0 Vote: I do not like it

        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

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Thanks it worked for me

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Thanks a lot worked for me

»
13 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

thanks. solved.

  • »
    »
    13 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Thanks for your comment bro, fixed this thing now in my PC also :)

»
9 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Thankyou so much

»
5 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

solved