cfmaster's blog

By cfmaster, history, 4 years ago, In English

Does anybody have any idea to do operations like multipling and adding to Big integers ? (for example with 100 digits)

acctually i know it can be done in languages like Java but i want to do it in c++ fast enough.

  • Vote: I like it
  • -25
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it +1 Vote: I do not like it

You can use fft if you can't apply this you can apply karatsuba (this is for multipling). Adding is simple.

»
4 years ago, # |
  Vote: I like it +5 Vote: I do not like it
»
4 years ago, # |
Rev. 2   Vote: I like it +21 Vote: I do not like it

U can write bignum struct by your own or get a help from blogs in Codeforces. U can read this blog! the blog that Bakry introduced is helpful too!