1:绝对值函数 abs()。
2: setw()。
3:向上取整 ceil()。
4:四舍五入 round()。(自动取到整数)
5:cout<<fixed<<setprecision( N )<<sum;(自动取到N位小数)
6.x[upper_bound(a+1,a+k+1,y)-x]
upper_bound(first,last,v)(在>=first,<last的区间内查找第一个大于v的值,如果查不到,返回last,时间复杂度为O(log n))
[upper_bound(a+1,a+k+1,y)-x](计算大于v的值的位置与数组 x 起始地址的偏移量(元素索引)。)
x[upper_bound(a+1,a+k+1,y)-x](通过计算出的索引访问数组 x 中的元素)