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.
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3856 |
2 | jiangly | 3747 |
3 | orzdevinwang | 3706 |
4 | jqdai0815 | 3682 |
5 | ksun48 | 3591 |
6 | gamegame | 3477 |
7 | Benq | 3468 |
8 | Radewoosh | 3462 |
9 | ecnerwala | 3451 |
10 | heuristica | 3431 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 168 |
2 | -is-this-fft- | 162 |
3 | Dominater069 | 160 |
4 | Um_nik | 159 |
5 | atcoder_official | 156 |
6 | djm03178 | 153 |
6 | adamant | 153 |
8 | luogu_official | 149 |
9 | awoo | 148 |
10 | TheScrasse | 146 |
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.
Название |
---|
You can use fft if you can't apply this you can apply karatsuba (this is for multipling). Adding is simple.
BigInt for C++ by Arpa
thanks!
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!
thanks! this was so helpful.
Big Integer Library by Jane Alam Jan