code__void's blog

By code__void, history, 2 years 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

| Write comment?
»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

USACO Guide. You can scroll down for more.

»
2 years ago, hide # |
 
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 years ago, hide # |
 
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.