码迷,mamicode.com
首页 >  
搜索关键字:support vector machi    ( 18250个结果
并查集
初始化 #include <numeric> vector<int> father(MAX); iota(father.begin() + 1, father.end(), 1); 查找根 int findFather(int u) { if (father[u] == u) return u; e ...
分类:其他好文   时间:2020-07-19 23:36:50    阅读次数:60
树算法(1)
容易忘的树基本操作 以中序与任意其他方法遍历建二叉树 // 中序与后续为例 struct node { int data; node *l, *r; }; // 中序的hash数组 int hashIn[MAX]; vector<int> in(MAX), post(MAX); node *crea ...
分类:编程语言   时间:2020-07-19 18:09:06    阅读次数:109
面试题 10.01.合并排序的数组
原题链接 题解 方式一:利用额外的空间 开一个额外的空间存放数据,最后再放回去 代码如下 class Solution { public: void merge(vector<int>& A, int m, vector<int>& B, int n) { int i = 0, j = 0; int ...
分类:编程语言   时间:2020-07-19 16:28:00    阅读次数:60
判断一个多边形的给定点是按顺时针给出还是逆时针
判断一个多边形的给定点是按顺时针给出还是逆时针 参考:判断一个多边形是顺时针还是逆时针的方法 bool judge(vector<double> x,vector<double> y,int n){ //1逆时针,0顺时针 if(n < 3) return 0.0>0; double s = y[0 ...
分类:其他好文   时间:2020-07-19 13:50:25    阅读次数:102
最长上升子序列
最长上升子序列 思路: 去过前面的数字小于当前数字,当前数字直接加入 否则 找到数组里面第一个>它的数字替换上 1 #include<bits/stdc++.h> 2 3 using namespace std; 4 int n,a; 5 vector<int> ve; 6 int main() { ...
分类:其他好文   时间:2020-07-19 11:44:52    阅读次数:52
Operation Love
C. Operation Love 先判断给定点是顺时针还是逆时针,然后再判断长度为6的边是在长度为9的边的左边还是右边即可 // Created by CAD #include <bits/stdc++.h> using namespace std; bool judge(vector<doubl ...
分类:其他好文   时间:2020-07-19 11:31:44    阅读次数:76
C++ unique去重的常用用法
1 #include <iostream> 2 #include <vector> 3 #include <algorithm> 4 5 using namespace std; 6 7 int main() 8 { 9 vector<int> nums{1,3,4,6,5,3,2,4,7,5}; ...
分类:编程语言   时间:2020-07-19 00:53:48    阅读次数:95
字符串拼接
题目:给定3个字符串a, b, c。你的任务是判断c是否可由a, b拼接出来。 c可由a, b拼接则意味着存在一种情况,将c拆分成两个子字符串,这两个子字符串分为等于a, b。注,c在拆分过程中,c中的每个字符只能属于两个子串中的一个。 输入包含多组样例,样例数不超过20。 第一行一个整数T,表示样 ...
分类:其他好文   时间:2020-07-18 22:49:55    阅读次数:88
逐层打印二叉树
struct BinaryTreeNode { int nvalue=0; BinaryTreeNode* pleft = nullptr; BinaryTreeNode* pright = nullptr; BinaryTreeNode* parent = nullptr;};vector<vec ...
分类:其他好文   时间:2020-07-18 22:37:14    阅读次数:87
laravel框架 路由和表单数据传输 数据库
设置路由: use Illuminate\Support\Facades\Route; //设置路由访问控制器只能是get访问 // Route::get('/user','User@user'); // Route::get('/',function(){ // return 'hello wor ...
分类:数据库   时间:2020-07-18 19:57:39    阅读次数:87
18250条   上一页 1 ... 46 47 48 49 50 ... 1825 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!