ZTL — Zimindaada Template Library 模板库

Update in 2020/11/24

0. 初始模板

#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
namespace ztd{
    using namespace std;
    #define dig_count(x) __builtin_popcountll(x)
    #define smallest_one(x) __builtin_ffsll(x)
    typedef long long ll;
    template<typename T> inline T read(T& t) {//fast read
        t=0;short f=1;char ch=getchar();double d=0.1;
        while (ch<'0'||ch>'9') {if (ch=='-') f=-f;ch=getchar();}
        while (ch>='0'&&ch<='9') t=t*10+ch-'0',ch=getchar();
        if(ch=='.'){ch=getchar();while(ch<='9'&&ch>='0') t+=d*(ch^48),d*=0.1,ch=getchar();}
        t*=f; return t;
    }
}
using namespace ztd;

signed main(){
    
    return 0;
}

完整版


1. 读写优化

- int/long long (已集成于基础模板)

- __int128

2. 数据结构

- Trie

- 树状数组

- 线段树

- 线性基

- 最小割树

3. 数学

3.1 组合

- 组合数Lucas

3.2 数论

- 数论基础模板

- Miller_Rabin

3.3 多项式

- 板子

3.4 其他

- 矩阵

原文地址:https://www.cnblogs.com/zimindaada/p/ZTL.html