码迷,mamicode.com
首页 >  
搜索关键字:vector    ( 11651个结果
LeetCode---排序
#853 车队 https://leetcode-cn.com/problems/car-fleet/ 这题我并没有使用某个排序算法,只是使用了Vector的可自定义sort方法。 class Solution { public: struct Car { int pos; int speed; f ...
分类:编程语言   时间:2020-06-08 12:46:31    阅读次数:48
排序算法06-归并排序
归并排序 大佬的归并排序详解 void mergeSort(vector<int>&arr, int start, int end) { if (arr.empty()||start >= end) return; int mid = (end + start) / 2; mergeSort(arr ...
分类:编程语言   时间:2020-06-08 12:19:33    阅读次数:62
高精度与大整数
高精度与大整数 1. 高精度 1.1 加法(大数+大数) #include <bits/stdc++.h> using namespace std; // 返回C = A + B vector<int> add(vector<int> &A, vector<int> &B) // A和B存储的都是逆 ...
分类:其他好文   时间:2020-06-08 10:55:40    阅读次数:38
p^3阶有限环序列以及R27的编号
gap> calT(27);41~4:G27_1=C27,N0=1,2,6,18,5~24:G27_2=C9 x C3,N0=1,8,18,0,25~59:G27_5=C3 x C3 x C3,N0=1,26,0,0, D:\MathTool\gaptool>RpppRppp(1,2)=R8_1,R ...
分类:其他好文   时间:2020-06-08 00:38:21    阅读次数:47
react-native-vector-icons的使用说明
一、安装: npm install --save react-native-vector-icons 推荐在RN项目中使用yarn安装包依赖 yarn add react-native-vector-icons 二、修改相关的配置文件(以Android 为例): 1、打开 android/app/b ...
分类:其他好文   时间:2020-06-07 21:40:42    阅读次数:89
Beautiful C++ STL
Headers <algorithm> <vector> <array> <list> <stack> <queue> <set> <map> <unordered_set> <unordered_map> <string> <iterator> <utility> <tuple> <numeric ...
分类:编程语言   时间:2020-06-07 21:34:14    阅读次数:88
tarjan 算法求无向图的桥_板子
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<vector> ? using namespace std; ? const int SIZE = 100010; int head[ ...
分类:编程语言   时间:2020-06-07 21:26:37    阅读次数:72
vector
1、越界检查a[2] 数组不会检查越界,vector会检查越界 2、容器中不能存放引用vector, vector<int*>,vector<int&>(这种情况不可以) 引用是个别名,不是对象,不是对象不能往vector中放 3、比较少见的几种创建方式vector a(5, -1); // 初始化 ...
分类:其他好文   时间:2020-06-07 12:42:17    阅读次数:90
算法训练-Don't fear, DravDe is kind
#include using namespace std; int n,dp[100001],v[100001],c[100001],l[100001],r[100001],maxx=0,ok[100001],ll,num=0,m=0; vector hash[100000]; //方法:使用一维数... ...
分类:编程语言   时间:2020-06-06 22:02:23    阅读次数:68
java基础之ArrayList 和Vector、CopyOnWriteArrayList
1.我们都知道ArrayList 是线程不安全的,不存在同步。 2.像Vector这种,add、remove方法都是原子操作,不会被打断,但也仅限于此,如果有个线程在遍历某个Vector、有个线程同时在add这个Vector,99%的情况下都会出现ConcurrentModificationExce ...
分类:编程语言   时间:2020-06-06 21:24:44    阅读次数:70
11651条   上一页 1 ... 57 58 59 60 61 ... 1166 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!