├── BASIC_TEMPLATE.cpp ├── GOOGLE_TEMPLATE.cpp ├── README.md ├── TEMPLATE.cpp ├── TEMPLATE2.cpp └── myGitLearnings.md /BASIC_TEMPLATE.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | typedef long long int ll; 5 | 6 | #define test(t) int t; cin >> t; while(t--) 7 | #define f(i, a, b) for(int (i) = (a); (i) < (b); ++(i)) 8 | #define endl "\n" 9 | #define deb(x) cout << #x << ": " << x << endl; 10 | #define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); 11 | 12 | void solve() 13 | { 14 | } 15 | 16 | int main() 17 | { 18 | fast; 19 | test(t) 20 | solve(); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /GOOGLE_TEMPLATE.cpp: -------------------------------------------------------------------------------- 1 | #pragma GCC optimize("O3") 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | using namespace std; 8 | using namespace __gnu_pbds; 9 | 10 | typedef long long int ll; 11 | typedef unsigned long long int ull; 12 | typedef long double ld; 13 | 14 | typedef pair pii; 15 | typedef pair pll; 16 | typedef vector vi; 17 | typedef vector vll; 18 | typedef vector vpii; 19 | typedef vector vpll; 20 | 21 | #define test(t) int t; cin >> t; while(t--) 22 | #define f(i, a, b) for(int (i) = (a); (i) < (b); ++(i)) 23 | #define all(a) (a).begin(), (a).end() 24 | #define endl "\n" 25 | #define ff first 26 | #define ss second 27 | #define pb push_back 28 | #define deb(x) cout << #x << ": " << x << endl; 29 | #define deb2(x,y) cout << #x << ": " << x << " ~ " << #y << ": " << y << endl; 30 | #define deba(arr) cout << #arr << " ~ [ "; for(auto n: arr) cout << n << " "; cout << "]" << endl; 31 | #define debap(arr) cout << #arr << " ~ [ "; for(auto n: arr) cout << n.first << "-" << n.second << " "; cout << "]" << endl; 32 | #define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); 33 | 34 | #define mx9 1000000007 35 | #define mx7 10000007 36 | #define mx6 1000006 37 | #define mx5 200005 38 | #define inf 1<<30 39 | #define eps 1e-9 40 | #define mod 1000000007 41 | #define PI 3.141592653589793238462643383279502884L 42 | 43 | void solve() 44 | { 45 | } 46 | 47 | int main() 48 | { 49 | fast; 50 | ll t; cin >> t; 51 | ll n = t; 52 | while(t--) 53 | { 54 | cout << "Case #" << n - t << ": "; 55 | solve(); 56 | } 57 | return 0; 58 | } 59 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # My CP Templates 2 | - Final Template: [TEMPLATE](TEMPLATE.cpp) 3 | - Simpler Templates: [BASIC_TEMPLATE](BASIC_TEMPLATE.cpp), [TEMPLATE - 2](TEMPLATE2.cpp) 4 | - For Google Competitions: [GOOGLE_TEMPLATE](GOOGLE_TEMPLATE.cpp) 5 | -------------------------------------------------------------------------------- /TEMPLATE.cpp: -------------------------------------------------------------------------------- 1 | #pragma GCC optimize("O3") 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | using namespace std; 8 | using namespace __gnu_pbds; 9 | 10 | typedef long long int ll; 11 | typedef unsigned long long int ull; 12 | typedef long double ld; 13 | 14 | typedef pair pii; 15 | typedef pair pll; 16 | typedef vector vi; 17 | typedef vector vll; 18 | typedef vector vpii; 19 | typedef vector vpll; 20 | 21 | #define test(t) int t; cin >> t; while(t--) 22 | #define f(i, a, b) for(int (i) = (a); (i) < (b); ++(i)) 23 | #define all(a) (a).begin(), (a).end() 24 | #define endl "\n" 25 | #define ff first 26 | #define ss second 27 | #define pb push_back 28 | #define deb(x) cout << #x << ": " << x << endl; 29 | #define deb2(x,y) cout << #x << ": " << x << " ~ " << #y << ": " << y << endl; 30 | #define deba(arr) cout << #arr << " ~ [ "; for(auto n: arr) cout << n << " "; cout << "]" << endl; 31 | #define debap(arr) cout << #arr << " ~ [ "; for(auto n: arr) cout << n.first << "-" << n.second << " "; cout << "]" << endl; 32 | #define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); 33 | 34 | #define mx9 1000000007 35 | #define mx7 10000007 36 | #define mx6 1000006 37 | #define mx5 200005 38 | #define inf 1<<30 39 | #define eps 1e-9 40 | #define mod 1000000007 41 | #define PI 3.141592653589793238462643383279502884L 42 | 43 | void solve() 44 | { 45 | } 46 | 47 | int main() 48 | { 49 | fast; 50 | test(t) 51 | solve(); 52 | return 0; 53 | } -------------------------------------------------------------------------------- /TEMPLATE2.cpp: -------------------------------------------------------------------------------- 1 | #pragma GCC optimize("O3") 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | using namespace std; 8 | using namespace __gnu_pbds; 9 | 10 | typedef long long int ll; 11 | typedef unsigned long long int ull; 12 | typedef long double ld; 13 | 14 | #define test(t) int t; cin >> t; while(t--) 15 | #define f(i, a, b) for(int (i) = (a); (i) < (b); ++(i)) 16 | #define all(a) (a).begin(), (a).end() 17 | #define endl "\n" 18 | #define deb(x) cout << #x << ": " << x << endl; 19 | #define deb2(x,y) cout << #x << ": " << x << " ~ " << #y << ": " << y << endl; 20 | #define deba(arr) cout << #arr << " ~ [ "; for(auto n: arr) cout << n << " "; cout << "]" << endl; 21 | #define debap(arr) cout << #arr << " ~ [ "; for(auto n: arr) cout << n.first << "-" << n.second << " "; cout << "]" << endl; 22 | #define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); 23 | #define mod 1000000007 24 | 25 | void solve() 26 | { 27 | } 28 | 29 | int main() 30 | { 31 | fast; 32 | test(t) 33 | solve(); 34 | return 0; 35 | } -------------------------------------------------------------------------------- /myGitLearnings.md: -------------------------------------------------------------------------------- 1 | # myGitTerminology 2 | This is a README.md file. 3 | .md is markdown. 4 | 5 | README.md is used to generate the overview/summary you see at the bottom of projects. 6 | 7 | Github has their own flavor of Markdown. 8 | Order of Preference: 9 | If you have two files named README and README.md, 10 | the file named README.md is preferred, 11 | and it will be used to generate github's html summary. 12 | 13 | # The Best way to Learn is, by Doing it. 14 | #### TO MASTER MARKDOWN TEXT FORMATTING: 15 | 16 | https://guides.github.com/features/mastering-markdown/ 17 | 18 | * mkdir *dir-name* 19 | * git clone *website-of-the-repo* 20 | * git status 21 | 22 | * git add *file-name* 23 | * git add -A 24 | * git commit -m *"message here..."* 25 | * git push origin master 26 | 27 | * git diff *file-name* 28 | * git checkout *file-name* 29 | 30 | * git log 31 | 32 | **A cool git command for you. 33 | In your project, run this command to see a really nice log.** 34 | 35 | * git log --topo-order --all --graph --date=local --pretty=format:'%C(green)%h%C(reset) %><(55,trunc)%s%C(red)%d%C(reset) %C(blue)[%an]%C(reset) %C(yellow)%ad%C(reset)%n' 36 | 37 | I've been using this really cool git command for a long time called **git lg**. It's like **git log** but wayyyyyyyy better. 38 | 39 | 40 | * git config --global user.email "example@email.com" 41 | * git config --global user.name "Your name" 42 | 43 | 44 | *that's it for now!* 45 | --------------------------------------------------------------------------------