码迷,mamicode.com
首页 >  
搜索关键字:clustering algorithm    ( 12082个结果)
uva 11292
不墨迹 #include <iostream> #include <algorithm> using namespace std; const int maxn = 1e6; int a[maxn], b[maxn]; int main() { #ifndef ONLINE_JUDGE freope ...
分类:其他好文   时间:2020-06-26 18:16:06    阅读次数:64
P1991 无线通讯网【kruskal】
题目 https://www.luogu.com.cn/problem/P1991 分析 本题使用kruskal算法,再能保证所有的节点都能够被连接的情况下,将构成最小生成树的边的长度入队进行排列,除去可以使用卫星电话的节点(就是除去排在前面最长的边)输出最长的边 至于添加边的话,要添加不同节点之间 ...
分类:其他好文   时间:2020-06-26 18:10:15    阅读次数:64
2018 ACM-ICPC World Finals Gym-102482C Conquer the World
题目传送门 分析: 费用流,然而不会优化,在线膜拜大佬的博客OrzOrzOrz #include<cstdio> #include<cmath> #include<cstring> #include<algorithm> #include<vector> #include<queue> #defin ...
分类:其他好文   时间:2020-06-26 16:28:00    阅读次数:54
浙大保研2019年上机题 7-2 Zigzag Sequence (25分)
7-2 Zigzag Sequence (25分) This time your job is to output a sequence of N positive integers in a zigzag format with width M in non-decreasing order. A ...
分类:其他好文   时间:2020-06-26 14:45:16    阅读次数:81
【LeetCode】【Math】missing number 缺失的数字
【题目】 给定一个包含从0、1、2,...,n中获取的n个不同数字的数组,找到该数组中缺少的一个。 Example 1: Input: [3,0,1] Output: 2 Example 2: Input: [9,6,4,2,3,5,7,0,1] Output: 8 Example 3: Input ...
分类:其他好文   时间:2020-06-26 13:05:13    阅读次数:54
算法进阶指南(DFS和BFS)--- 小猫爬山
题目链接:小猫爬山 解法一: #include<iostream> #include<algorithm> using namespace std; const int N = 20; int n,m; int cat[N],sum[N]; int ans=N; void dfs(int now,i ...
分类:编程语言   时间:2020-06-26 10:50:34    阅读次数:99
Codeforces Round #381 (Div. 1) E - Gosha is hunting 最大费用网络流 期望
#include<cstdio> #include<cstring> #include<algorithm> #include<queue> #include<iostream> using namespace std; const int maxn=200010; const double eps ...
分类:其他好文   时间:2020-06-25 19:49:59    阅读次数:64
C#数据结构与算法系列(十五):排序算法(SortAlgorithm)
1.介绍 排序是将一组数据,以指定的顺序进行排序的过程 2.分类 内部排序法:指将需要处理的所有数据都加载到内部存储器中进行排序 外部排序法:数据量过大,无法全部加载到内存中,需要借助外部存储进行排序 ...
分类:编程语言   时间:2020-06-25 15:25:37    阅读次数:54
PTA 乙级 1005 继续(3n+1)猜想 (25分)
1 #include <iostream> 2 #include <vector> 3 #include <algorithm> 4 using namespace std; 5 bool cmp(int a, int b) { 6 return a > b; 7 } 8 int main() { ...
分类:其他好文   时间:2020-06-25 09:46:47    阅读次数:57
ICPC Pacific Northwest Regional Contest 2016 C. Buggy Robot
Buggy Robot 思路:dp[inx][x][y],表示用了前inx个指令后的最小费用。 对于一个指令,我们可以选择不走或者走,其他的我们可以添加四个方向的指令与使用过指令后的dp来比较。 1 #include <iostream> 2 #include <algorithm> 3 #incl ...
分类:其他好文   时间:2020-06-24 16:11:34    阅读次数:35
共12082条   上一页 1 ... 35 36 37 38 39 ... 1209 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!