码迷,mamicode.com
首页 >  
搜索关键字:clustering algorithm    ( 12082个结果)
kruskal
题目:https://pintia.cn/problem-sets/15/problems/718 #include<iostream> #include<algorithm> #include<vector> using namespace std ; struct mat{ int a,b,c; ...
分类:其他好文   时间:2020-06-14 23:20:59    阅读次数:69
「板子」环形带限制的子段和
/*#!/bin/sh dir=$GEDIT_CURRENT_DOCUMENT_DIR name=$GEDIT_CURRENT_DOCUMENT_NAME pre=${name%.*} g++ -O2 $dir/$name -o $pre -g -Wall -std=c++11 if test $? ...
分类:其他好文   时间:2020-06-14 18:24:00    阅读次数:52
PAT高效技巧算法---1045 快速排序 (25分)
1045 快速排序 (25分) 求划分的主元(比左边的都大,右边的都小) #include<iostream> #include<vector> #include<cctype> #include<map> #include<set> #include<sstream> #include<strin ...
分类:编程语言   时间:2020-06-14 10:28:39    阅读次数:66
动态规划的引入 P1616 疯狂的采药【完全背包】
题目 https://www.luogu.com.cn/problem/P1616 题目分析 完全背包 代码 #include<iostream> #include<cstdio> #include<algorithm> using namespace std; int f[10000002], v ...
分类:其他好文   时间:2020-06-13 21:40:53    阅读次数:63
动态规划的引入 P1048 采药【01背包】
题目 https://www.luogu.com.cn/problem/P1048 题目分析 01背包 代码 #include<iostream> #include<cstdio> #include<algorithm> using namespace std; int f[1001], v[200 ...
分类:其他好文   时间:2020-06-13 21:16:29    阅读次数:51
动态规划的引入 P1002 过河卒【动态规划】
题目 https://www.luogu.com.cn/problem/P1002 题目分析 卒可以向右、向下走,所以使用dp数组,如果自己的左边是通的(不是被马控制的节点)就把自己的dp加上自己左边的dp(上边同理),一直到最后最右下方的节点,该点的dp值就是答案 至于马的控制点:另外开一个数组, ...
分类:其他好文   时间:2020-06-13 21:15:13    阅读次数:97
动态规划的引入 P1802 5倍经验日【变形的01背包】
题目 https://www.luogu.com.cn/problem/P1802 题目分析 见代码注释 代码 #include<iostream> #include<cstdio> #include<algorithm> using namespace std; long long f[10001 ...
分类:其他好文   时间:2020-06-13 21:13:43    阅读次数:65
P1020 导弹拦截
#include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; int f[100010]; int a[100010],temp[100010],len; int cmp( ...
分类:其他好文   时间:2020-06-13 17:20:02    阅读次数:53
归并排序模板
#include<iostream>#include<algorithm>#include<cstring>#include<cstdio>using namespace std;const int N=1e6+10;int q[N]= {0},temp[N]={0};void merge_sort ...
分类:编程语言   时间:2020-06-13 12:48:12    阅读次数:52
算法:异或运算^
package club.interview.algorithm.eor; import java.util.Arrays; /** * 异或运算 == 无进位相加 * 1. 找到整数二进制最后一个1的下标位置 {@link EorT#findIndexOne(int)} } * 2. 统计整数二进 ...
分类:编程语言   时间:2020-06-13 12:43:18    阅读次数:48
共12082条   上一页 1 ... 39 40 41 42 43 ... 1209 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!