Programming Tutorial Links
Shafaet’s Blog Progkriya Blog Zobayer’s Blog Fahim’s Blog Hukush-Pakush Programming Tutorial Sanny’s Blog A Competitive Programming Course by Bjarki Ágúst Guðmundsson Geometry Algorithms C++ Tricks By Swift… Read more “Programming Tutorial Links”
Data Structure
SegmentTree v1: #include<bits/stdc++.h> using namespace std; #define sz 1000 struct segment { int value;//or sum int prop; }; struct segment tree[sz*3]; int a[sz]; void build_tree(int node, int… Read more “Data Structure”
Number Theory
SIEVE & NOD: #include<bits/stdc++.h> #define LL long long #define N 100007 using namespace std; vector<LL>pr; int a[N]; void sieve() { int i,j,limit=sqrt(N)+1; a[0]=a[1]=1; pr.push_back(2); for(i=4;i<=N;i=i+2) { a[i]=1;… Read more “Number Theory”
String
KMP: char txt[1000],pat[1000]; int prar[1000]; void prefix_array(int len) { prar[0]=0; int i=1,j=0; while(i<len) { if(pat[i]==pat[j]) { j++; prar[i]=j; i++; } else//pat[i]!=pat[j] { if(j!=0) { j=prar[j-1]; } else//j==0… Read more “String”
Contest Template
#include<bits/stdc++.h> #define pie acos(-1) #define si(a) scanf(“%d”,&a) #define sii(a,b) scanf(“%d %d”,&a,&b) #define siii(a,b,c) scanf(“%d %d %d”,&a,&b,&c) #define sl(a) scanf(“%lld”,&a) #define sll(a,b) scanf(“%lld %lld”,&a,&b) #define slll(a,b,c) scanf(“%lld %lld… Read more “Contest Template”
Graph Theory
Graph Storage: #include<iostream> #include<cstdio> #include<vector> #define pb push_back #define N 100000 using namespace std; int main()//graph store undirected { int i,j,x,y,n,e; vector<int>edge[N]; vector<int>cost[N]; cin>>n>>e; for(i=0;i<e;i++) { cin>>x>>y;… Read more “Graph Theory”
Hello! I am Inzamam
Hello! I am Inzamam.I have completed my undergrad in CSE at University Of Dhaka. This page is only for my codebook.If found any wrong, please mail me… Read more “Hello! I am Inzamam”