研究題解看見別人用這個函數,然后就能直接用vector,set,string那些函數了,摸不着頭腦,感覺特神奇就百度了一下,才發現這個是C++版本升級,然后文件自帶的,方便了程序員吧。不然每次都得敲那模板老長……
使用和平常的頭文件一樣,如下:
#include<bits/stdc++.h>
using namespace std; int main() { int a,b; cin>>a>>b; cout<<a+b<<endl; return 0; }
#include<bits/stdc++.h>這個頭文件包含以下等等C++中包含的所有頭文件:
#include <iostream>
#include <cstdio>
#include <fstream>
#include <algorithm>
#include <cmath>
#include <deque>
#include <vector>
#include <queue>
#include <string>
#include <cstring>
#include <map>
#include <stack>
#include <set>
等等……