Блог пользователя codeforthrone

Автор codeforthrone, история, 5 лет назад, По-английски

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

  • Проголосовать: нравится
  • +14
  • Проголосовать: не нравится

»
5 лет назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

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 года назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

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