Introduction:
Problems in competitive programming which involve Mathematics are are usually about number theory, or geometry. If you know number theory, that increases your ammo heavily in solving a lot of tougher problems, and helps you in getting a strong hold on a lot of other problems, too.
Problems in competitive programming require insight, so just knowing some topics is not enough at all. All of the problems requires more or less math tough. For instance, solving large systems of equations and approximating solutions to differential equations. Modulo:

Modulo operation gives the remainder after division, when one number is divided by another. It is denoted by % sign.
Example:

We have two numbers 5 and 2, then 5%2 is 1 as when 5 is divided by 2, it leaves 1 as remainder.
Properties:

Some of the properties of modulo are:

(a+b)%c = (a%c + b%c )%c.

(a * b)%c = ((a%c) * (b%c))%c.
Example:

Let’s say a = 5, b = 3, c = 2.

Then:

1) (5+3)%2 = 8%2 = 0.

Similarly (5%2 + 3%2)%2 = (1 + 1)%2 = …

## Comments

## Post a Comment