codeforthrone's blog

By codeforthrone, history, 5 years ago, In English

I tried solving a big integer problem, but custom input on compiling not letting me use boost library. Any Solution?

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

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

In my opinion this is one of the biggest issues when using C++ in competitive programming. Your options are either to

  • switch to python or java for the problem
  • write your own
  • use some library implementation (that you can copy-paste to your code)

Nearly always the best solution is to just use python. If other parts of the problem make using python too slow, the only required operation is addition, and operating on strings is fast enough, I just write a function for adding two strings representing base-10 integers. Otherwise, you need to use some ready-made implementation. I've never had to do this, so I unfortunately cannot recommend you any good ones.

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

You can't use third party libraries in competitive programming. You can only use the standard library and any extensions provided by the compiler.