YoyOyoYOy000y000's blog

By YoyOyoYOy000y000, history, 7 years ago, In English

which primes are best for hashing a graph? like two tree is isomorpic? then we need to hash the graph..need some prime. which are best for it. thank you :)

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

| Write comment?
»
7 years ago, # |
  Vote: I like it +4 Vote: I do not like it
  • »
    »
    7 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    thanks vai..i think for these problem we need higher prime, cause nodes can be up to 10^5 ..i am not sure.

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

use unordered_map

i think it'll work for your work or u can google for the primes over 1e6 and find your power and mod... :)

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

    In this problem, i saw that everyone use higher prime. In lower prime they get Wa.. They use 10^10 up primes.