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

Автор williamkeri, история, 4 часа назад, По-английски

I have seen a lot a people using "Mint" or "mint" or (some other variable names) instead of "int" whenever we need to do operations on 10e9+7 or some other big numbers, so that the value is always within range. Can anyone explain how to use it.

Hope to have some good explanations, thanks.

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

»
4 часа назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by williamkeri (previous revision, new revision, compare).

»
4 часа назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

USACO Guide. You can scroll down for more.

»
4 часа назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

It's a template, tourist has one as well, you can find his here

»
2 часа назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Mint is a wrapper for operations on integers done under some modulo, so, for example, instead of writing (((a*b)%MOD)*c)%MOD over and over again, you can just write a*b*c (with a,b,c being Mints). It makes the code simpler.