Things that we will discuss here
- What is Code Template?
- Why do we use Code Template?
- Sample Code Template.
- Summary.
What is Code Template?
Code templates are pre written code which you use. For example on most of
the coding platforms code editor you get some pre written code like
this.
Why do we use Code Template?
- To save our time during contest.
- Along with code templates we also save some code snippet in the editor which we use during contest.
- Here is my code template
// Author: Praveen Kumar Rana
// Date: 25-10-2021 (19:08:03)
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
#define NL "\n"
#define int long long int
#define all(x) x.begin(), x.end()
const int mod = 1e9 + 7;
void solve() {
// Write your code here.
}
int32_t main() {
std::ios_base::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
solve();
return 0;
}
Summary
In this post, I tried to introduce you about Code Template and which code
template I use.
On how to create a template please go through this.
If you want to know something more or have any queries feel free to
comment.
Thank you for reading. Regards
Praveen Kumar Rana
Tags:
CP