A code shelf for XCPC Template.
Author: NogiNonoka
Data: 2020 - 11 - 09
-
Name as
$AlgorithmName.h
or$AlgorithmName.cpp
-
If you defined the code as Header Files, Submit a
($AlgorithmName)_Test.cpp
for test.
-
Permit but Not Recommend using
bits/stdc++.h
; -
Do Not Use
#define
for Constants, usingconst
instead; -
Do Not Use
typedef
for Variable Types, usingtemplate<typename >
or useint
anddouble
;
- Use
//
or/* */
;
-
Other Algorithms you Used in your Algorithm;
-
Analyze Time and Space Complexity;
-
Optional
-
Use
//
in a Single Line;
-
Recommend using Struct / Template for Data Structure and Algorithm;
-
Use Pascal Case or Camel Case for Naming Functions in Struct;
-
Add a DEBUG part / function;
-
(Optional) Add a Problem ID with a Link and solve it in your
main
function or Independentsolve
function;
// Optional
#define int long long
#define double long double
const int MAXN = ;
const int MAXE = ;
const int MOD = ;
const int INF = ;
const double eps = ;
const double PI = acos(-1);
const int DIRX[] = {};
const int DIRY[] = {};
This Constants which you Used should be defined in your Template;
#include <bits/stdc++.h>
using namespace std;
// #define int long long
// #define double long double
// #define endl "\n"
// const int MAXN = ;
// const int MAXE = ;
// const int MOD = ;
// const int INF = ;
// const double eps = ;
// const double PI = acos(-1);
// const int DIRX[] = {};
// const int DIRY[] = {};
signed main(void) {
ios::sync_with_stdio(false);
cin.tie(nullptr); cout.tie(nullptr);
return 0;
}
CodeShelf
├─ComputationalGeometry
├─DataStructure
├─DynamicProgramming
├─GraphTheory
├─MathTheory
├─Others
└─String