Comments

Post a Comment

Popular posts from this blog

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.
Set Theory
Before we proceed, let us get through the some common set operations.
Q.) What is a Set?
-In mathematics, a set is a collection of distinct objects, considered as an object in its own right.
For example, the numbers 2, 4, and 6 are distinct objects when considered separately, but when they are considered collectively they form a single set of size three, written {2,4,6}.
Sets are one of the most fundamental concepts in mathema…

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 = …

sudo apt-get install python-numpy cython
This will install a fast numeric processing library (numpy) and a tool required in the pandas build process (cython).Test numpy
Open up a Python prompt by running the following:python
At the prompt, type the following:>>>import numpy
>>>print numpy.__version__
You should see a number like "1.6.1" or higher. Test cython
Open up a Python prompt by running the following:python
At the prompt, type the following (capitalization matters!):>>>importCython>>>printCython.__version__
You should see a number like "0.15.1" or higher. Download pandas
We recommend storing pandas in a directory called ''projects'' in your user directory. To do that, run the following commands:mkdir -p ~/projects
cd ~/projects
git clone https://github.com/pydata/pandas.git
cd pandas
You will see git download pandas. Once the download finishes, and you get your prompt back, proceed to the next step.Build p…