AC(AtCoder) Library Document下載使用
如何安裝
- 首先在 Github 上找到 ac-library 倉庫。下載最新版本
- 解壓 zip 文件后將
atcoder
,放置GCC的對於庫文件夾下。 - 使用g ++,可以通過
g++ main.cpp -std=c++14 -I .
將atcoder
文件夾放在與相同的位置進行編譯main.cpp
。- 您應該使用
-std=c++14
或進行編譯-std=c++17
。
- 您應該使用
- 有關更多詳細信息,請參見附錄。
筆記
- 如果輸入與約束不匹配,則行為未定義。
- 為了簡單起見,我們將類型縮寫如下。
unsigned int
→uint
long long
→ll
unsigned long long
→ull
- \(0^0 = 1\)
- 除非指定,否則允許多個邊沿和自環。
頭文件
#include <atcoder/all>
:包括所有內容
數據結構
#include <atcoder/fenwicktree>
#include <atcoder/segtree>
#include <atcoder/lazysegtree>
#include <atcoder/string>
數學
圖論
#include <atcoder/dsu>
#include <atcoder/maxflow>
#include <atcoder/mincostflow>
#include <atcoder/scc>
#include <atcoder/twosat>
附錄
測試
- 您可以在此處測試此庫。
執照
文件atcoder
夾中的頭文件是根據CC0許可證授權的。有關atcoder/LICENSE
詳細信息,請參見。