wxy

归档

2024 年 10 月

2024-10-20

[capture list] (parameters) -> return_type { // 函数体 }; #include <iostream> #include <vector> #include <algorithm> struct Node { int v;

2024 年 01 月

2024-01-02

递归快速幂 //递归快速幂 int qpow(int a, int n) { if (n == 0) return 1; else if (n % 2 == 1) return qpow(a, n - 1) * a; else {

2023 年 12 月

四舍六入五成双 #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(

2023 年 11 月

2023 年 10 月

2023 年 05 月

#include&lt;bits/stdc++.h&gt;using namespace std;const int m = 10; //树的度typedef struct node Node;typedef node *tree;struct node{char data;

2023-05-06

#include&lt;bits/stdc++.h&gt;using namespace std;struct student{//成员变量string name;int x,y;//无参数构造函数student(){}//带参数构造函数student(int x1,int y1):x(x1),y(

2023 年 03 月