四舍六入五成双 #include<bits/stdc++.h> using namespace std; int main(){ printf("%.2f\n",9.825); //输出9.82 printf("%.2f\n",9.825001); //输出9.83 printf("%.2f\
lower_bound & upper_bound #include<bits/stdc++.h> using namespace std; int main(){ vector<int> v={1,2,3,4,5}; auto p = lower_bound(v.begin(),v.end(
#include<bits/stdc++.h>using namespace std;const int m = 10; //树的度typedef struct node Node;typedef node *tree;struct node{char data;
#include<bits/stdc++.h>using namespace std;struct student{//成员变量string name;int x,y;//无参数构造函数student(){}//带参数构造函数student(int x1,int y1):x(x1),y(
1198:逆波兰表达式1201:菲波那契数列1202:Pell数列1204:爬楼梯1205:汉诺塔问题1207:求最大公约数问题1208:2的幂次方表示
传值与传地址#include<bits/stdc++.h>using namespace std;//传值void f1(int a,int b){int t=a;a=b;b=t;}//传地址void f2(int &a,int &b){int t=a;a=b;b=t;}