O(n) n < 10^8.
O(nlogn) n < 10^6.
O(n*sqrt(n)) n < 10^5.
O(n^2) n < 5000.
O(n^3) n < 300.
O(2^n) n < 25.
O(n!) n < 11.
# 在"x64 Native Tools Command Prompt for VS 2019"环境下
# %comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
# 使用"NMake Makefiles" generator可以生成compile_commands.json, 而"Visual Studio 16 2019"不能
cmake -G "NMake Makefiles" -DCMAKE_EXPORT_COMPILE_COMMANDS=YES -S ~/OJ -B ~/OJ/build -DMAIN:STRING=kmp.cpp
cmake --build ~/oj/build
# 默认使用"Visual Studio 16 2019" generator
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=YES -S ~/OJ -B ~/OJ/build -DMAIN:STRING=kmp.cpp
cmake --build ~/oj/build
# 使用clang编译器替代cl.exe
cmake -G "NMake Makefiles" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_EXPORT_COMPILE_COMMANDS=YES -S ~/OJ -B ~/OJ/build -DMAIN:STRING=kmp.cpp
cmake --build ~/oj/build
mklink C:\Users\zgp\oj\compile_commands.json C:\Users\zgp\oj\build\compile_commands.json