
----------数据结构--------
沈尽欢
这个作者很懒,什么都没留下…
展开
-
紫书uva1395(苗条的生成树)
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int inf=0x3f3f3f3f; int n,m,a,b,len,pre[110]; struct node { int d1,d2,l; }e[10010]; bool com(node x,node y) { r...原创 2018-11-27 10:56:49 · 183 阅读 · 0 评论 -
C++保留小数位数问题
首先 介绍主角: setprecision() 和 setiosflags() 这两个函数是头文件#include<iomanip>里的函数,记得加头文件#include<iomanip> setprecision() 顾名思义:就是设定精度。用来控制输出的数的位数(从左到右的),自动四舍五入。且不保留小数后的0。比如: int pi = 3.14...转载 2019-02-14 14:32:14 · 18125 阅读 · 1 评论