Skip to main content

Posts

Showing posts with the label Template

Template for C++ Program

C++ is a very important language in competitive programming because C++ include flexibility of C and have extended STL template library.You can use C++ easy and and quick way if you have a template file. A template file contains a format and necessary code which is required frequently in competitive programming.You can save a lot of time by using template file because it takes some time if you have to include another header and define some more macros. Here I am giving a simple template file according to my convenience.You can edit it or generate another file according to yours. #include<iostream> #include<cstdio> #include<bitset> #include<vector> #include<cmath> #include<queue> #include<map> #include<set> #include<list> #include<stack> #include<string> #include<cstdlib> #include<cstring> #include<algorithm> using namespace std; #define fori(i,n) for(i=0;i<(n);++i) #define fo...