码迷,mamicode.com
首页 >  
搜索关键字:using password: yes    ( 53562个结果
二叉搜索树_BST
二叉搜索树 定义 二叉查找树(英语:Binary Search Tree),也称为二叉搜索树、有序二叉树(ordered binary tree)或排序二叉树(sorted binary tree),是指一棵空树或者具有下列性质的二叉树: 若任意节点的左子树不空,则左子树上所有节点的值均小于它的根节 ...
分类:其他好文   时间:2020-05-31 00:56:13    阅读次数:52
C++ 模板类vector
#include<vector> // 包含头文件vector ... using namespace std; // vector包含在std中,因此必须包含std::vector vector <int> vi; // create a zero-size array of int int n; ...
分类:编程语言   时间:2020-05-30 23:25:48    阅读次数:106
七大排序之快排(重点 面试基本都会问)
必须要明白的: 分治法+挖坑填数; 分治法:大问题分解成各个小问题,对小问题求解,使得大问题得以解决。 1 #include<iostream> 2 #include<time.h> 3 #include<stdlib.h> 4 #include<sys/timeb.h> 5 using names ...
分类:编程语言   时间:2020-05-30 22:16:02    阅读次数:95
pta c++ 两点间距离计算 (40分)
给出下面的一个基类框架: class Point_1D { protected: float x;//1D 点的x坐标 public: Point_1D(float p = 0.0); float distance(const Point_1D & p2); } 以Point_1D为基类建立一个派生 ...
分类:编程语言   时间:2020-05-30 22:01:17    阅读次数:84
【模板】点分治
#include<cstdio> #include<cstring> #include<iostream> #include<cmath> #include<algorithm> #include<queue> using namespace std; const int maxn=1e4+5,IN ...
分类:其他好文   时间:2020-05-30 21:49:50    阅读次数:66
Cannot create __weak reference in file using manual reference counting
升级Xcode之后,编译之前的代码,出现Cannot create __weak reference in file using manual reference counting解决方法: 在Build Settings--------->Aplle LLVM9.0 - Language - Ob... ...
分类:其他好文   时间:2020-05-30 19:42:40    阅读次数:56
c++ 多线程(2)创建线程对象的方法
@ 一、用函数对象创建线程 // 用函数对象创建线程 #include <iostream> #include <thread> using namespace std; void func(){ cout<<"我的线程开始执行了"<<endl; //... cout<<"我的线程结束执行了"<<e ...
分类:编程语言   时间:2020-05-30 15:57:28    阅读次数:56
luogu P6577 【模板】二分图最大权完美匹配
#pragma GCC optimize (3,"inline","Ofast") #include <bits/stdc++.h> using namespace std; typedef long long ll; const ll N=505; const ll inf=1e18; ll n, ...
分类:其他好文   时间:2020-05-30 12:55:10    阅读次数:57
2020-05-26 — 习题训练 题解
A题,要想前面的差小于后面的,只要排一下序然后先输出中间的,在输出前一个,在输出后一个,然后一直一前一后输出就可以了。 #include<bits/stdc++.h> using namespace std; #define LL long long int main() { int t; cin> ...
分类:其他好文   时间:2020-05-30 12:39:20    阅读次数:53
P2341 [USACO03FALL][HAOI2006]受欢迎的牛 G
题目传送门!! 经典强联通题目。 对于一个强联通,如果其出度为0,则其中所有的奶牛都为明星。 注意,如果出现两个以上出度为0的强联通,则无法做到“被全部喜欢”, 应该特判输出“0”。 #include <bits/stdc++.h> using namespace std; #define N 10 ...
分类:其他好文   时间:2020-05-30 12:35:51    阅读次数:54
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!