2013年8月12日

HDU 4579 Random Walk (解方程组)

摘要: Random WalkTime Limit: 5000/2000 MS (Java/Others)Memory Limit: 65535/65536 K (Java/Others)Total Submission(s): 81Accepted Submission(s): 35Problem DescriptionYuanfang is walking on a chain. The chain has n nodes numbered from 1 to n. Every second, he can move from node i to node j with probability:c 阅读全文

posted @ 2013-08-12 21:48 kuangbin 阅读(1291) 评论(2) 推荐(0)

SPOJ 375. Query on a tree (树链剖分)

摘要: 题目链接:http://www.spoj.com/problems/QTREE/375. Query on a treeProblem code: QTREEYou are given a tree (an acyclic undirected connected graph) withNnodes, and edges numbered 1, 2, 3...N-1.We will ask you to perfrom some instructions of the following form:CHANGE i ti: change the cost of the i-th edge to 阅读全文

posted @ 2013-08-12 19:45 kuangbin 阅读(3618) 评论(2) 推荐(0)

树链剖分学习

摘要: 最近一段时间决定先好好搞一下数据结构了,首先搞了下树链剖分;专题训练:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=28982#overview树链剖分并不是一个复杂的算法或者数据结构,只是能把一棵树拆成链来处理而已,换一种说法,树链剖分只是xxx数据结构/算法在树上的推广,或者说,树链剖分只是把树hash到了几段连续的区间上。学习链接:入门:http://blog.sina.com.cn/s/blog_7a1746820100wp67.html (看了这个讲解,再把题目A掉就有点理解了)https://quartergeek.co 阅读全文

posted @ 2013-08-12 19:43 kuangbin 阅读(13256) 评论(0) 推荐(2)

导航

JAVASCRIPT: