摘要:
#include<bits/stdc++.h> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <vector> using namespace std; //a、b、c、d是 阅读全文
摘要:
#include<bits/stdc++.h> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <vector> using namespace std; typedef in 阅读全文
摘要:
#include<bits/stdc++.h> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <vector> using namespace std; //1.让输入10个 阅读全文
摘要:
//leetcode700 二叉搜索树中的搜索 TreeNode* searchBST(TreeNode* root, int val) { if(root == nullptr || root->val == val) return root; if(root->val > val) return 阅读全文
摘要:
//1.计算度为2 度为1 度为0的结点个数 void Count(BiTree bt) { if(bt) { if(bt->lchild && bt->rchild) n2++; else if(bt->lchild && !bt->rchild || bt->rchild && !bt->lch 阅读全文
摘要:
#include<bits/stdc++.h> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <vector> #include<cmath> using namespace 阅读全文
摘要:
#include<bits/stdc++.h> //求n个数的最小公倍数 #define lcm(a,b) a / gcd(a,b)*b long gcd(long m,long n) { while(n) { long tmp = m % n; m = n; n = tmp; } return m 阅读全文
摘要:
#include<bits/stdc++.h> //发工资 其实就是在数组中求面值数 int main1() { int n ; int a[] = {100,50,10,5,2,1}; int size =sizeof(a) /sizeof(int); int res; int val; whil 阅读全文
摘要:
#include<stdio.h> #include<bits/stdc++.h> //去掉一个最高分和一个最低分,然后计算平均得分 int main1() { int n; int a[101]; int sum; while(scanf("%d",&n)!=EOF) { sum = 0; for 阅读全文
摘要:
#include<stdio.h> #include<math.h> //统计给定的n个数中,负数、零和正数的个数。 int main1() { int n; while(scanf("%d",&n)!=EOF) { if(n == 0) break; int fu = 0,zero = 0 ,zh 阅读全文