Debug Function :
Bit Check :
Check two fractional number to skip precision error :
Modular Arithmetic :
Directional Arrays :
int dx[] = {+0, +0, -1, +1}; ///Up-down, Left-Right
int dy[] = {+1, -1, +0, +0};
int dx[] = {+0,+0,+1,-1,-1,+1,-1,+1}; ///King's Move
int dy[] = {-1,+1,+0,+0,+1,+1,-1,-1};
int dx[] = {-2, -2, -1, -1, 1, 1, 2, 2}; ///Knight's Move
int dy[] = {-1, 1, -2, 2, -2, 2, -1, 1};
Compiler Optimization :
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx,avx2,fma")
No comments:
Post a Comment