- 博客(4)
- 收藏
- 关注
原创 c/c++的limits.h头函数
c/c++的limits.h头函数中定义了很多数据类型的极值,比较常用的有: 短整型最大最小:SHRT_MAX、SHRT_MIN 整型最大最小:INT_MAX、INT_MIN 超长整型最大最小:LLONG_MAX、LLONG_MIN...
2018-08-07 22:09:46
1916
原创 随机生成输入文件
#include <bits/stdc++.h> #define random(a,b) (rand()%(b-a+1)+a) //生成a到b的随机数 using namespace std; int main(){ long long x,a,y,b; bool i=true; srand((unsigned)time(NULL)); //随机种子 ...
2018-08-03 03:18:48
186
原创 C++取整
#include <iostream> #include <cstdio> #include <cmath> //ceil()、floor()、round()包含在cmath库中,int()为强制类型转换 using namespace std; int main(){ //ceil()上取整,朝正无穷方向取整 cout<<ceil(...
2018-07-26 02:00:21
3401
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人