求解连通性问题,最好用的当然是并查集了,可以使用深搜或者广搜。这道题目的意思是给定一些道路,如果把其中一个顶点去掉,那么需要建立多少条道路才能联通所有顶点。这道题目如果用朴素的并查集的话第四个测试用例会超时,因此想到带路径压缩的并查集。递归或者非递归方式都可以,对于这道题目来说不会差别很大,不过用递...
分类:
其他好文 时间:
2014-09-19 22:19:06
阅读次数:
229
Sparse CodingSparse coding is a class of unsupervised methods for learning sets of over-complete bases to represent data efficiently. —— 过完备的基,无监督 The...
分类:
其他好文 时间:
2014-09-19 18:57:05
阅读次数:
272
select HSL.sortno, HSL.B, HSL.A, row_number() over(order by sortno desc) xh from (select t.B, t.A, case when t.B= '股份公司' then 9999999 else t.A end as....
分类:
数据库 时间:
2014-09-18 18:10:24
阅读次数:
216
Winpdb is a platform independent graphical GPL Python debugger with support for remote debugging over a network, multiple threads, namespace modificat...
分类:
数据库 时间:
2014-09-17 18:36:24
阅读次数:
339
Over time, Alexey's mail box got littered with too many letters. Some of them are read, while others are unread.
Alexey's mail program can either show a list of all letters or show the content of a s...
分类:
其他好文 时间:
2014-09-17 15:16:42
阅读次数:
248
Drainage Ditches
Time Limit: 1000MS Memory Limit: 10000K
Total Submissions: 56802 Accepted: 21824
Description
Every time it rains on Farmer John's fields, a pond forms over Bessie's favorite clo...
分类:
其他好文 时间:
2014-09-16 10:50:00
阅读次数:
253
SELECT * FROM
( SELECT JBXX.*,row_number() OVER (partition BY WRYMC ORDER BY WRYMC,CJSJ DESC) R
FROM T_WRY_JBXX JBXX
) A WHERE R=1...
分类:
数据库 时间:
2014-09-13 20:12:05
阅读次数:
211
Description
The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-born babies. They seek the name, and at the sa...
分类:
其他好文 时间:
2014-09-13 10:40:55
阅读次数:
197
IE7以上都支持父元素加一下cssoverflow: hidden;white-space: no-wrap; //阻止换行text-over: ellipsis; //超过长度...子元素为行内元素就可
分类:
其他好文 时间:
2014-09-12 18:46:53
阅读次数:
221
表scores(name,sex,score),分别获取男女前三名学生姓名。建立表格:createtablescores(namevarchar2(8),sexvarchar2(1),scorenumber(3,0))插入学生成绩insertintoscores(name,sex,score)values(‘男A‘,‘1‘,100);insertintoscores(name,sex,score)values(‘男B‘,‘1‘,90);insertint..
分类:
数据库 时间:
2014-09-12 15:28:14
阅读次数:
264