williamkeri's blog

By williamkeri, history, 4 hours ago, In English

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.

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
4 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
4 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

USACO Guide. You can scroll down for more.

»
4 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
2 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

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.