mohitm's blog

By mohitm, history, 3 weeks ago, In English,

I am new to codeforces, I tried boost library for big integers but it gave me error boost/multiprecision/cpp_int.hpp: No such file or directory Is it not possible to use boost library ?

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

»
3 weeks ago, # |
  Vote: I like it +13 Vote: I do not like it

You have the source code. Copypaste it.

No, you're not allowed to include external libraries like Boost. If it fits in the source you're submitting, you can put it directly there.

»
3 weeks ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

You can preprocess the file to avoid the dependency on headers (if the library is header-only), but Codeforces only allow maximum file size 65536 bytes.

I don't know if there's a way to remove unused parts of the code. creduce looks promising but it seems to be unnecessarily general (and could be slower than necessary)

Also, you can use another (header-only) bigint library (such as https://github.com/sercantutar/infint https://codeforces.com/blog/entry/16380 https://codeforces.com/blog/entry/67827 https://codeforces.com/blog/entry/22566 — search for one yourself)

If the code compiles on your machine, you can use this script to include all the local headers (so it can be submitted on Codeforces)

Code

UPD: You can use this code to remove unused functions:

Code