ICode9

精准搜索请尝试: 精确搜索
  • 17、嵌入式中将(Android)手机转作为嵌入式的摄像头和终端使用(Opencv和C++Python支持)2021-01-16 10:02:09

    因为囊中羞涩,所以想把手机转换成摄像头和屏幕作为嵌入式的数据采集模块和终端显示界面; 首先PC端需要安装opencv,自行百度~~~ Android 手机需要安装APP链接:https://pan.baidu.com/s/1sGyTYv5AJkCDBjMpi8nL8A 密码:ymfp 然后首先在嵌入式端尝试链接局域网的手机监控摄像头的画面;   之

  • LeetCode题解——冗余连接(并查集)——java实现2021-01-13 21:34:30

    在本问题中, 树指的是一个连通且无环的无向图。输入一个图,该图由一个有着N个节点 (节点值不重复1, 2, ..., N) 的树及一条附加的边构成。附加的边的两个顶点包含在1到N中间,这条附加的边不属于树中已存在的边。结果图是一个以边组成的二维数组。每一个边的元素是一对[u, v] ,满足 u

  • TEB程序解析1(base_teb_edges.h)2021-01-09 09:32:58

    /********************************************************************* * * Software License Agreement (BSD License) * * Copyright (c) 2016, * TU Dortmund - Institute of Control Theory and Systems Engineering. * All rights reserved. * * Redistr

  • Line Segment Detection Using Transformers without Edges2021-01-07 11:58:01

    LETR 表现SOTA!性能优于HAWP、L-CNN等网络。XETR命名大法好!目前已有DETR(检测)、SETR(分割)、LETR(线段检测)等工作,那么AETR、BETR、CETR还会远么(手动狗头)。 注1:文末附【Transformer】交流群 LETR Line Segment Detection Using Transformers without Edges 作者单位:加利福

  • qq一笔画红包 的c语言解决方法(改)2021-01-01 23:29:20

    我之前的程序采用邻接矩阵存储图链接如下,我这里稍作改进 https://blog.csdn.net/eu_zero/article/details/112056006 考虑到稀疏图用类似于邻接表的方式来输入可以节约用户的输入时间,于是我改进了代码,新增一个in()函数采用类似邻接表的录入形式,内部存储形式不变依旧用邻接矩

  • 例题7-6(uva-140)2021-01-01 12:29:23

    #include <iostream> #include <istream> #include <sstream> #include <vector> #include <stack> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <cstring&g

  • Minimum Spanning Tree Gym - 102220E2020-12-31 12:32:45

        In the mathematical discipline of graph theory, the line graph of a simple undirected weighted graph GG is another simple undirected weighted graph L(G)L(G) that represents the adjacency between every two edges in GG. Precisely speaking, for an un

  • [LeetCode] 261. Graph Valid Tree2020-12-28 03:32:14

    Given n nodes labeled from 0 to n-1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges make up a valid tree. Example 1: Input: n = 5, and edges = [[0,1], [0,2], [0,3], [1,4]] Output: true Example

  • 684. Redundant Connection2020-12-24 00:00:59

    In this problem, a tree is an undirected graph that is connected and has no cycles. The given input is a graph that started as a tree with N nodes (with distinct values 1, 2, ..., N), with one additional edge added. The added edge has two different vertic

  • 网络流模板2020-12-06 00:02:35

    刘汝佳的EK板子.. 懂的都懂 #include<iostream> #include<cstdio> #include<vector> #include<queue> #include<algorithm> #include<cstring> #define INF 20000000 #define maxn 205 using namespace std; struct Edge{ int from,to,cap,flow;

  • 1557. 可以到达所有点的最少点数目2020-12-05 12:05:15

    给你一个 有向无环图 , n 个节点编号为 0 到 n-1 ,以及一个边数组 edges ,其中 edges[i] = [fromi, toi] 表示一条从点  fromi 到点 toi 的有向边。 找到最小的点集使得从这些点出发能到达图中所有点。题目保证解存在且唯一。 你可以以任意顺序返回这些节点编号。

  • POJ 2449 Remmarguts' Date2020-12-04 21:32:36

    传送门 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <queue> using namespace std; typedef long long ll; typedef pair<int, int> p; const int maxn(1e3 + 10); const int maxm(2e5 + 10)

  • 洛谷 P3806 【模板】点分治12020-12-03 21:34:49

    传送门 #include <bits/stdc++.h> using namespace std; using ll = long long; using p = pair<int, int>; const int maxn(1e4 + 10); const int maxm(1e2 + 10); const int maxk(2e7 + 10); int ecnt, head[maxn]; int que[maxm], ans[maxn]; int rt, tot, root[

  • 算法题 Kruskal算法求最小生成树(Python)2020-12-01 17:31:45

    题目: 给定一个n个点m条边的无向图,图中可能存在重边和自环,边权可能为负数。 求最小生成树的树边权重之和,如果最小生成树不存在则输出impossible。 给定一张边带权的无向图G=(V, E),其中V表示图中点的集合,E表示图中边的集合,n=|V|,m=|E|。 由V中的全部n个顶点和E中n-1条边构成的无向

  • 【CF576E】Painting Edges(线段树分治+并查集)2020-12-01 12:33:50

    点此看题面 给定一张\(n\)个点\(m\)条边的图,有\(k\)种颜色。 \(q\)次操作,每次修改一条边的颜色,如果修改之后这种颜色的边会形成奇环就不执行该操作。 问每次操作是否会执行。 \(n,m,q\le5\times10^5,k\le50\) 线段树分治 刚看完题面以为是道大裸题,仔细一想突然发现因为一些操作

  • 最小生成树总结2020-11-22 16:31:30

    最小生成树:prim用于处理稠密图,因为他是以点为起点开始扩散,kruskal用于处理稀疏图,因为他以边为基准 Prim算法解决最小生成树问题,思路和Dijkstra很像 联系:Dijkstra算法是更新到起始点的距离,Prim是更新到生成树集合的距离 #include <iostream> #include <cstring> using namespace s

  • 高级数据结构(一)----并查集2020-11-21 13:03:18

    1.什么是并查集?   当初第一次与ta邂逅,是在一次算法选修课上。ta只是用文本来做了简单的自我介绍,没有让我留下很深的印象,甚至都没有说自己在哪工作的,以使我已经很久都没能再与ta重逢。直至有一次在某篇博文上,以程序代码的形式出现让我看到了ta的真容,那时让我陷入ta的内在原理中研

  • DP中环形处理 +(POJ 1179 题解)2020-11-20 20:34:13

    DP中环形处理 对于DP中存在环的情况,大致有两种处理的方法: 对于很多的区间DP来说,很常见的方法就是把原来的环从任意两点断开(注意并不是直接删掉这条边),在复制一条一模一样的链在这条链的后方,当做线性问题来解,即可实现时间复杂度降维。 情况一:将原来的环从任意两点断开,再当做线性问

  • bellman-ford (nm)2020-11-19 09:02:38

    bellman-ford是一个可以求带负权边的单源最短路,但是时间复杂度是铁定的O(nm),所以我们一般用他的优化版本SPFA,不过由于bellman-ford算法的流程,它也可以用来解决一类特定的问题 那就是求出起点到其他点经过不大于k条边的最短路径 1 #include<iostream> 2 #include<cstring> 3 us

  • 无向图DFS和BFS2020-11-07 16:33:06

    #define MAX_NUM 20 typedef struct { int vexnum, arcnum;//顶点数和边数 int vexs[MAX_NUM];//顶点数组 int edges[MAX_NUM][MAX_NUM];//邻接矩阵 }MGraph; int visit[MAX_NUM] = { 0 }; void CreateGraph(MGraph& G) { cin >> G.vexnum >> G.arcnum; for (int i =

  • LeetCode 310 - Minimum Height Trees (Medium)2020-11-05 03:31:44

    A tree is an undirected graph in which any two vertices are connected by exactly one path. In other words, any connected graph without simple cycles is a tree. Given a tree of n nodes labelled from 0 to n - 1, and an array of n - 1 edges where edg

  • [LeetCode] 310. Minimum Height Trees2020-11-05 02:32:14

    A tree is an undirected graph in which any two vertices are connected by exactly one path. In other words, any connected graph without simple cycles is a tree. Given a tree of n nodes labelled from 0 to n - 1, and an array of n - 1 edges where edg

  • AGC033F Adding Edges2020-10-23 20:35:00

    一棵树\(T\)和一张图\(G\),现在对图进行加边操作:每次找到\((a,b,c)\)满足\((a,b),(b,c)\in E_G\),且\(a,b,c\)任意顺序在\(T\)上排列在一条链上。 问对图\(G\)操作到不能操作时,\(|E_G|\)是多少。 \(n,m\le 2000\) 神仙题。。。对着三个标切的,下次遇到估计还是不会做。。。 如果\(a,

  • POJ 2949 Word Rings2020-10-21 02:32:24

    传送门 同 AcWing 1165 单词环、洛谷 SP2885 WORDRING - Word Rings、LOJ 10082 Word Rings #include <iostream> #include <cstring> #include <cstdio> #include <queue> #include <cmath> using namespace std; typedef long long ll; typedef pair<

  • CodeForces - 14D Two Paths(两次bfs求树的直径)2020-10-11 18:01:22

    CF14D Two Paths 题目大意: 给定一棵权值为\(1\)的树,从中两条最长的路径且两者没有公共节点,求最大的二路径乘积。 思路: 观察到\(n\)的范围很小,可以枚举每条要删的边,再在两个子树中求树的直径,相乘即为答案。 本题我采用两次\(bfs\)的方式求树的直径。 另外,记得打上删除标记。 时间复

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有