算法常用库与函数[持续更新]
#include
常用万能头文件
#include
全名 input /output stream:输入输出流
#include
算法库的函数
#include#include <string.h>
这两个代码在做算法的时候作用等价
详细可以参考:https://blog.csdn.net/zollty/article/details/7291889
#include#include
同理,详细请参考:https://blog.csdn.net/weixin_44703894/article/details/117876697
#include
全名standard library ,标准库文件,内含许多有用的方法,其中算法用的最多的当属qsort,还有一些常用的值比如INT_MIN,INT_MAX
#include//集合,可变长数组 #include
ios::sync_with_stdio(false), cin.tie(0),cout.tie(0);
取消c++输入输出兼容c,解除输入输出流的绑定,使c++输入输出与c语言有着等效的效率(不会在一些题目因为cin,cout而超时)
详细参考:https://blog.csdn.net/u014665013/article/details/70521300
using namespace std;
使用命名空间,c++头文件,配合iostream
typedef long long ll;
简化long long 类型的书写为ll