跳到正文

个人记录

ZTL — Zimindaada Template Library 模板库

zimindaada约 3 分钟
原文
文章信息与版本

文章信息

发布
2019年11月6日
收录
2025年12月12日
更新
2026年11月21日
篇幅
约 3 分钟

版本

  1. v1当前

新ZTL

Update in 2020/09/11

0. 初始模板

C++
#include <bits/stdc++.h>
namespace ztd{
	#pragma GCC target ("popcnt")
    using namespace std;
    #define reg register
    #define ms(a) memset(a,0,sizeof(a))
    #define dig_count(x) __builtin_popcountll(x)
    #define smallest_one(x) __builtin_ffsll(x)
    #define endl '\n'
    typedef long long ll;
    typedef unsigned long long ull;
    typedef unsigned int uint;
    typedef double db;
    //basic I/O
    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 数论

- 数论基础模板

3.3 其他

- 矩阵
原文
存档评论1 条抓取于