题目链接: 传送门 Graph Construction Time Limit: 3000MS     Memory Limit: 65536K Description Graph is a collection of edges E and vertices V. Graph has a wide variety of applications in computer. There are different ways to represent graph in computer. It can…
题目链接: 题目 Graph Construction Time limit: 3.000 seconds 问题描述 Graph is a collection of edges E and vertices V. Graph has a wide variety of applications in computer. There are different ways to represent graph in computer. It can be represented by adjace…
题目大意:给n个整数, 分别代表图中n个顶点的度,判断是否能构成一张图. 看到这个题后,除了所有数之和应该为偶数之外,没有别的想法了,只好在网上搜解题报告了.然后了解了Havel-Hakimi定理.之后的事情就简单了. #include <cstdio> #include <algorithm> #include <functional> using namespace std; #define MAXN 10000+10 int a[MAXN]; int n; boo…
题意 题目链接 \(T\)组数据,给出\(n\)个点的度数,问是否可以构造出一个简单图 Sol Havel–Hakimi定理: 给定一串有限多个非负整数组成的序列,是否存在一个简单图使得其度数列恰为这个序列. 令\(S=(d_1,d_2,\dots,d_n)\)为有限多个非负整数组成的非递增序列. S可简单图化当且仅当有穷序列\(S'=(d_2-1,d_3-1,...,d(d_1+1)-1,d(d_1+2),...,d_n)\)只含有非负整数且是可简单图化的. 最后判断一下是否都是零就好了 感觉…
Luogu传送门(UVA常年上不去) 题意:求一个度序列是否可变换为一个简单图.$\text{序列长度} \leq 10000$ 题目看起来很简单,但是还是有一些小细节需要注意首先一个简单的结论:一张图的所有点的度数之和为偶数,因为每一条边都会对度数和产生$2$的贡献.通过这一个结论可以判断掉很多的非法情况.当然如果做到这里就天真地交上去了,在若干秒之后就会给你显示一个喜庆的$WA$,因为我们还有一个很重要的因素没有考虑:图是一个简单图.简单图意味着不能有重边和自环,而上面的那个结论不足以判断图…
Description You are to write a program that tries to find an optimal coloring for a given graph. Colors are applied to the nodes of the graph and the only available colors are black and white. The coloring of the graph is called optimal if a maximum…
链接: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4261 题意: 输入一个h行w列的字符矩阵,草地用“#”表示,洞用“.”表示.你可以把草改成洞,每格花费为d,也可以把洞填上草,每格花费为f.最后还需要在草和洞之间修围栏,每条边的花费为b.整个矩阵第一行/列和最后一行/列必须都是草.求最小花费.2≤w,h≤50,1≤d, f, b≤…
链接:http://uva.onlinejudge.org/external/107/10733.pdf 题意: N 种颜色可以涂成多少种立方体~ 思路: 使正六面体保持不变的运动群总共有: 1.不变置换(1)(2)(3)(4)(5)(6), 共1个; 2.沿对面中心轴旋转 90度, 270度 (1)(2345)(6), (1)(5432)(6) 同类共 6个; 3.沿对面中心轴旋转 180度 (1)(24)(35)(6), 同类共 3个; 4.沿对角线轴旋转 120度, 240度 (152)(…
Pool construction You are working for the International Company for Pool Construction, a construction company whichspecializes in building swimming pools. A new client wants to build several new pool areas.A pool area is a rectangular grid of w × h s…
Lily: “Chantarelle was part of my exotic phase.”Buffy: “It’s nice. It’s a mushroom.”Lily: “It is? That’s really embarrassing.”Buffy: “Well, it’s an exotic mushroom, if that’s any comfort.”Joss Whedon, "Anne".A little girl whose name is Anne Spetri…
题意: 给一个h*w的矩阵,每个格子中是'#'和'.'两个符号之一,分别代表草和洞.现在要将洞给围起来(将草和洞分离),每条边需花费b元(即将一个洞包起来需要4边,将2个连续的洞包起来需要6边,省了2条边).有个特殊能力,能将洞变成草,花费f.当然也能将草变成洞,花费d.围起洞来需要多少花费.矩阵四周最边边的格子都必须是草,即出现洞就必须转草. 转换:洞--->草--->洞      f   d   (元/格) 围洞: b元/边. 思路: 如果能够尽量让洞都靠在一起,那肯定是最小花费,因为少了…
题意:图上的点染色,给出的边的两个点不能都染成黑色,问最多可以染多少黑色. 很水的一题,用dfs回溯即可.先判断和当前点相连的点是否染成黑色,看这一点是否能染黑色,能染色就分染成黑色和白色两种情况递归,如果不能就单递归白色. 代码: #include <cstdio> #include <cstring> const int maxn = 110; int cas, v, e, M; bool g[maxn][maxn]; int color[maxn], rec[maxn]; v…
题目大意:给你一个无向图的顶点和边集,让你求图中连通分量的个数.使用并查集解决. #include <cstdio> #include <cstring> #define MAXN 30 bool G[MAXN][MAXN]; int p[MAXN]; int find(int x) { return x == p[x] ? x : p[x]=find(p[x]); } int main() { #ifdef LOCAL freopen("in", "…
邻接矩阵的特征值和特征向量不会随着节点的排列不同而变化.两个图同构可以推出他们的邻接矩阵具有相同的特征值和特征向量,但是反过来不行.…
题意: 给一个无向图,再给一系列操作(以下3种),输出最后的平均查询结果. (1)D X 删除第x条边. (2)Q X k  查询与点X相连的连通分量中第k大的点的权值. (3)C X v  将点X的权值改为v. 思路: 第一点,由于需要删除边,不是很方便,所以可以先将所有操作存起来,反序来操作,这样删边就变成加边,方便了不少.每次加边时若两点不属于同个连通分量,就将点少的整个连通分量中的点逐个插入到另一个连通分量中. 第二点,查第k大,这个比较简单,只需要维护Treap上每个点的的左右孩子数量…
输入一个字符矩阵,'.'代表洞,'#'代表草地.可以把草改成洞花费为d,或者把洞改成草花费为f,最后还要在草和洞之间修围栏花费为b. 首先把最外一圈的洞变成草,并累加花费. 增加一个源点和一个汇点,源点连接每个草地,汇点连接每个洞. 源点与最外一圈的草地连一条容量无穷大的边,与其他草地连一条容量为d的边.表示把这条弧切断,割的容量增加d,草就会变成洞. 每个洞与汇点连一条容量为f的边. 相邻两个格子之间连一条双向边. 用最大流算法求最小割在加上之前把边界上的洞变成草的费用,就是最小花费. 用最小…
题目 Volume 0. Getting Started 开始10055 - Hashmat the Brave Warrior 10071 - Back to High School Physics 10300 - Ecological Premium 458 - The Decoder 494 - Kindergarten Counting Game 414 - Machined Surfaces 490 - Rotating Sentences 445 - Marvelous Mazes…
Frogs' Neighborhood Time Limit: 5000MS   Memory Limit: 10000K Total Submissions: 9897   Accepted: 4137   Special Judge Description 未名湖附近共有N个大小湖泊L1, L2, ..., Ln(其中包括未名湖),每个湖泊Li里住着一只青蛙Fi(1 ≤ i ≤ N).如果湖泊Li和Lj之间有水路相连,则青蛙Fi和Fj互称为邻居.现在已知每只青蛙的邻居数目x1, x2, ..…
题目链接:E - New Year and the Acquaintance Estimation 题解参考: Havel–Hakimi algorithm 和 Erdős–Gallai theorem 按照后面那个定理说的,枚举$k∈[1,n]$,对于每一个$k$,计算出向等式两边加入$a_{n+1}$的合法范围,最后所有范围求交即可 最后按照前面那个定理说的,枚举最终区间的时候,对于合法真正的$a_{n+1}$进行输出即可 比赛的时候没看见后面那个定理,推了半天 --------------…
Spatial Temporal Graph Convolutional Networks for Skeleton-Based Action Recognition 2018-01-28  15:45:13  研究背景和动机: 行人动作识别(Human Action Recognition)主要从多个模态的角度来进行研究,即:appearance,depth,optical-flow,以及 body skeletons.这其中,动态的人类骨骼点 通常是最具有信息量的,且能够和其他模态进行互补.…
论文信息 论文标题:Graph Contrastive Clustering论文作者:Huasong Zhong, Jianlong Wu, Chong Chen, Jianqiang Huang, Minghua Deng, Liqiang Nie, Zhouchen Lin, Xian-Sheng Hua论文来源:2021, ICCV论文地址:download论文代码:download 1 Introduction 研究方向:解决传统的 URL  没有考虑到类别信息和聚类目标的问题. 传统对…
@http://www-cs-faculty.stanford.edu/people/karpathy/cvpr2015papers/ CVPR 2015 papers (in nicer format than this) maintained by @karpathy NEW: This year I also embedded the (1,2-gram) tfidf vectors of all papers with t-sne and placed them in an interf…
Large Scale Distributed Semi-Supervised Learning Using Streaming Approximation Google  2016.10.06 官方 Blog 链接:https://research.googleblog.com/2016/10/graph-powered-machine-learning-at-google.html 今天讲的是一个基于 streaming approximation 的大规模分布式半监督学习框架,出自 Goo…
    Graph-powered Machine Learning at Google     Thursday, October 06, 2016 Posted by Sujith Ravi, Staff Research Scientist, Google ResearchRecently, there have been significant advances in Machine Learning that enable computer systems to solve compl…
用后感: 拼个小基因组还好,对于很大的基因组,文库很多的,还是不要用了.服务器768G内存,都不够用.... 主页: http://bioinf.spbau.ru/spades 说明书: http://spades.bioinf.spbau.ru/release3.6.1/manual.html Note, that SPAdes was initially designed for small genomes. It was tested on single-cell and standard…
转自:https://dev.to/alagrede/why-i-dont-want-use-jpa-anymore-fl Great words for what is considered by many as the greatest invention in the Java world. JPA is everywhere and it is inconceivable today to writing a Java application without him. Neverthel…
Visual Semantic Navigation Using Scene Priors 2018-10-21 19:39:26 Paper:  https://arxiv.org/pdf/1810.06543.pdf Demo:https://www.youtube.com/watch?v=otKjuO805dE&feature=youtu.be 本文将首先定义什么是 visual semantic navigation, 然后描述怎么利用深度强化学习的框架来解决该问题,以及该任务的 bas…
转自:http://blog.csdn.net/chenhoujiangsir/article/details/51613144 说明:本文是kaldi主页相关内容的翻译(http://kaldi-asr.org/doc/tree_externals.html).目前网上已经有一个翻译的版本,但翻译的不是很清楚,导致我在刚学这部分内容的时候产生了一些误解,所以我希望结合我目前所知道的一些东西,尽量把这部分内容翻译地比较容易理解,但由于也是初学者,一些错误也是不可避免,希望大家发现后一起交流,以便…
1)背景 组装:短的reads通过overlap来组装成contig 局限性:repeat 大于overlap导致ambiguous reconstructions and fragment the assembly 两个策略:increasing the effective read length(增加reads长度), and separating nonexact repeats based on copy-specific variants(通过特定的copy-变异分离repeats)…
Effective TensorFlow Table of Contents TensorFlow Basics Understanding static and dynamic shapes Scopes and when to use them Broadcasting the good and the ugly Feeding data to TensorFlow Take advantage of the overloaded operators Understanding order…