//模板开始
#include <string>
#include <vector>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <fstream>
#include <map>
#include <set>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <iomanip>
#include <queue>
#include <string.h>
#define SZ(x) (int(x.size()))
using namespace std;
int toInt(string s){
istringstream sin(s);
int t;
sin>>t;
return t;
}
template<class T> string toString(T x){
ostringstream sout;
sout<<x;
return sout.str();
}
typedef long long int64;
int64 toInt64(string s){
istringstream sin(s);
int64 t;
sin>>t;
return t;
}
template<class T> T gcd(T a, T b){
if(a<0)
return gcd(-a, b);
if(b<0)
return gcd(a, -b);
return (b == 0)? a : gcd(b, a % b);
}
#define LOCAL
//模板结束(通用部分)
int main()
{
#ifdef LOCAL
//freopen("shuju.txt", "r", stdin);
#endif
return 0;
}
C++编程模板(头文件 + 常用函数)
最新推荐文章于 2025-09-13 16:33:05 发布
本文深入探讨了C++编程中的高级特性、优化策略及常见陷阱,旨在帮助开发者提高代码质量和效率。从模板使用、内存管理到异常处理,全方位解析C++编程精髓。
2565

被折叠的 条评论
为什么被折叠?



