Recent News This document is to guide those people who want to get started or have just started with competitive programming.Originally, this document was prepared during the summers of 2014 to help the freshers of Indian Institute of Technology, Kanpur. So, we thought it might be useful to others as well.Prerequisite: Basics of any programming language. We will follow C/C++.Note: Please note that this blog is not meant to explain concepts in details. The Aim of this blog is to guide you about which topics
you should read and practice in a systematic way. However, in many
places short explanations have been included for their relevance.
Relevant problems are given after each topic. Proper sources are given
from where these concepts can be studied. Where sources are not
mentioned, that means these are very very popular and you can get to
know about them just by a single google search. Move forward and enjoy

for(int i=0;i&lt;n;i++)

{

scanf(“%d”,&curr);

sum = sum+curr;

}Total number of computations = n*(1+1+1+1)n times checking i<n.
n times i++
n times scanf
n times + operatingSo total of 4*N.
We remove the constant and call it O(N)
This is the simplest I can explain.You will get further understanding with practice and learning.You must know running time of these algorithms (MUST)Binary Search -> ?
Merge / Quick sort -> ?
Searching an element in sorted/unsorted array -> ?HCF / LCM / Factorization / Prime CHeck ?We all know the computation power of a processor is also limited.
Assume 1 sec ~ 10^8 operations per second . (for spoj old server it is 4*10^6).
Keep this in mind while solving any problem.If your program takes O(n^2) steps and problems has T test cases . Then total order is T*N^2.For T < 100 and N < 1000 . It will pass .
But for T < 1000 and N < 1000 it wont .
Neither for T < 10 and N < 10000 .INT OVERFLOW:Sum three numbers.
Constraints :
0 < a,b,c < 10^9int main()
{
int a , b,c;
scanf(“%d %d %d”,&a,&b,&c);
int ans = a + b + c;
printf(“%d”,ans);
return 0;
}This program won’t give correct output for all cases as 310^9 cannot be stored in INTS you need long long int or unsigned int (410^9).what if 0<a,b,c < 10^1000 ?Comparing Doubles :int main()

{

float a ;

scanf(“%f”,&a);

if(a == 10 ) printf(“YES”);

return 0; 