本人整理,欢迎补充或提出错误。
/* 基础 */
#include<bits/stdc++.h> // 万能头
#include<cstdio> // scanf(), printf(), puts(), freopen()
#include<iostream> // cin, cout, cerr
#include<iomanip> // setprecision()
#include<cstdlib> // rand(), exit()
/* 工具 */
#include<cctype> // tolower(), toupper(), isdigit()
#include<cmath> // abs(), pow(), sqrt(), log(), exp(), sin(), cos(), tan(), ceil(), floor(), 变量重名问题重灾区
#include<cstring> // memset(), strlen(), strcpy(), strcmp()
/* STL */
#include<vector>
#include<queue> // priority_queue 也在此
#include<deque>
#include<list>
#include<set> // multiset 也在此
#include<map> // multimap 也在此
#include<unordered_map> // unordered_multimap 也在此
#include<stack>
#include<bitset>
#include<string> // STL 的 string
#include<algorithm> // min(), max(), swap(), sort(), lower_bound(), next_permutation(), unique(), make_heap(), 永远的神
/* pb_ds(不要求掌握) */
#include <ext/pb_ds/priority_queue.hpp>
#include <ext/pb_ds/assoc_container.hpp> // 平衡树
#include <ext/pb_ds/tree_policy.hpp> // 平衡树
using namespace __gnu_pbds; // pb_ds 的数据结构均需配合此命名空间
/* 杂项 */
#include<cassert> // 非常好用的 assert 调试
#include<random> // mt19937
#include<ctime> // 卡时用的 CLOCKS_PER_SEC, clock(), time()
#include<climits> // INT_MAX, INT_MIN
using namespace std;
int main() {
/* 必须放在任何输入输出之前,注意文件名以及文件扩展名、引号、r和w、in和out */
freopen("name.in", "r", stdin); // 从 name.in 文件中输入,"r" 是 read 的意思
freopen("name.out", "w", stdout); // 从 name.out 文件中输出,"w" 是 write 的意思
/* 这里写你的代码 */
return 0; // 不需要且不应写 fclose,主函数必须 return 0
}