from FreeCAD import Base # 点坐标 V1 = Base.Vector(0,10,0) V2 = Base.Vector(30,10,0) V3 = Base.Vector(30,-10,0) V4 = Base.Vector(0,-10,0) VC1 = Base.Vect ...
分类:
其他好文 时间:
2020-03-31 20:39:29
阅读次数:
94
对比一下串行流和并行流的效率: /** * @author WGR * @create 2020/3/31 */ public class Demo07Parallel { private static final int times = 500000000; long start; @Before ...
分类:
其他好文 时间:
2020-03-31 18:53:57
阅读次数:
56
基本思想: 最长不下降字串问题,注意dp数组的思想; 关键点: 无; #include<iostream> #include<vector> #include<algorithm> using namespace std; const int maxn = 25; int n; int d[maxn ...
分类:
其他好文 时间:
2020-03-31 14:26:57
阅读次数:
85
两种方法 一:使用set 二:使用sort+unique 就是:先排序,然后用unique把重复的数字都放在后面,再用erase删除 // // Created by LK on 2020/3/31. // #include <iostream> #include <vector> #include ...
分类:
其他好文 时间:
2020-03-31 12:40:05
阅读次数:
58
class RandomizedCollection { unordered_map<int,unordered_set<int>> m; vector<int> vals; public: /** Initialize your data structure here. */ Randomized ...
分类:
其他好文 时间:
2020-03-31 12:39:20
阅读次数:
61
#include <iostream> #include <vector> #include <algorithm> using namespace std; typedef pair<int, int> PII; const int N = -2e9; void merge(vector<PII> ...
分类:
编程语言 时间:
2020-03-31 12:39:01
阅读次数:
101
leetcode33 搜索旋转排序数组 来源: "LeetCode" 假设按照升序排序的数组在预先未知的某个点上进行了旋转。 ( 例如,数组?[0,1,2,4,5,6,7]?可能变为?[4,5,6,7,0,1,2]?)。 搜索一个给定的目标值,如果数组中存在这个目标值,则返回它的索引,否则返回 1? ...
分类:
其他好文 时间:
2020-03-31 10:44:15
阅读次数:
55
给定一个 没有重复 数字的序列,返回其所有可能的全排列。 示例: 输入: [1,2,3] 输出: [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1] ]解答(C++): class Solution { public: vector<vect ...
分类:
编程语言 时间:
2020-03-31 10:40:34
阅读次数:
98
List<String> list = new ArrayList<>();使用ArrayList对数据进行赋值,会出现不同线程争抢同一资源造成写入失败问题,会抛出异常“ConcurrentModificationException” List<String> list = new Vector<> ...
分类:
编程语言 时间:
2020-03-30 23:33:57
阅读次数:
97
1 class Solution 2 { 3 int dx[4] = {1,0,-1,0}; 4 int dy[4] = {0,1,0,-1}; 5 public: 6 void setZeroes(vector<vector<int>>& matrix) 7 { 8 int m = matrix. ...
分类:
其他好文 时间:
2020-03-30 19:52:56
阅读次数:
54