YoyOyoYOy000y000's blog

By YoyOyoYOy000y000, history, 6 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?
»
6 years ago, # |
  Vote: I like it +4 Vote: I do not like it
  • »
    »
    6 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.

»
6 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... :)

  • »
    »
    6 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.