题目链接 题意:求最小环 第一反应时floyd判断,但是涉及到最少3个点,然后就不会了,又想的是 双联通分量,这个不知道为什么不对。 Floyd 判断 最小环 1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 #in ...
分类:
其他好文 时间:
2016-04-06 00:24:46
阅读次数:
208
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each num ...
分类:
其他好文 时间:
2016-04-06 00:22:31
阅读次数:
147
uva,146 全排列问题:permutation 具体详解:参考Devymex UVa Problem 146 - ID Codes Problem:Please find the problem here.Solution:This is simply the next permutation ...
分类:
其他好文 时间:
2016-04-06 00:15:03
阅读次数:
236
原问题描述如下。 Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [100, 4, 200, 1, 3, 2], ...
分类:
其他好文 时间:
2016-04-05 22:38:53
阅读次数:
246
删除一个目录下的所有文件,但保留一个指定文件:find/目录/-typef!name"file"|xargsrm-f每次开机在/tmp目录下创建一个当天的日期文件夹:echo"mkdir/tmp/`date+%Y%m%d`">>/etc/rc.d/rc.local将/usr/local/test目录下大于100k的文件转移到/tmp目录下:find/usr/local/tes..
分类:
系统相关 时间:
2016-04-05 20:07:45
阅读次数:
197
quicksum Queation: Given a string of digits, find the minimum number of additions required for the string to equal some target number. Each addition i ...
分类:
其他好文 时间:
2016-04-05 19:34:34
阅读次数:
262
I would recommend to debug and find which constraint is "the one you don't want". Suppose you have following issue: Always the problem is how to find ...
分类:
其他好文 时间:
2016-04-05 12:43:31
阅读次数:
391
Write a SQL query to find all numbers that appear at least three times consecutively. For example, given the above Logs table, 1 is the only number th ...
分类:
其他好文 时间:
2016-04-05 12:32:25
阅读次数:
137
文章目录如下 (1)自己的思路 (2)自己的代码 (3)别人的思路 (4)别人的代码 (5)对比自己的不足之处 题目如下: Write a function to find the longest common prefix string amongst an array of strings. ( ...
分类:
其他好文 时间:
2016-04-05 02:00:44
阅读次数:
117