摘要: 完善刘佳汝紫书P361、P362的代码 邻接矩阵存稀疏图太耗内存了 这种写法感觉不错 copy一下 写的有点急 可能有的地方有错误 有些地方还可以在优化 p数组记录路径未验证 以后还会在写一个用 pair 的迪杰斯特拉写法 欢迎交流!!~~~ 阅读全文
posted @ 2017-10-23 21:21 灬从此以后灬 阅读(523) 评论(1) 推荐(1) 编辑
摘要: 题意 分析 白皮书 P282 例题9-12 AC代码 阅读全文
posted @ 2017-10-21 17:37 灬从此以后灬 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 转自 http://blog.csdn.net/angon823 介绍 1、什么是树型动态规划 顾名思义,树型动态规划就是在“树”的数据结构上的动态规划,平时作的动态规划都是线性的或者是建立在图上的,线性的动态规划有二种方向既向前和向后,相应的线性的动态规划有二种方法既顺推与逆推,而树型动态规划是建 阅读全文
posted @ 2017-10-21 10:59 灬从此以后灬 阅读(167) 评论(0) 推荐(0) 编辑
摘要: C. Tram time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The tram in Berland goes along a 阅读全文
posted @ 2017-10-16 17:38 灬从此以后灬 阅读(216) 评论(0) 推荐(0) 编辑
摘要: f(cos(x))=cos(n∗x) holds for all xx. Given two integers nn and mm, you need to calculate the coefficient of x^mx​m​​ in f(x)f(x), modulo 9982443539982 阅读全文
posted @ 2017-09-19 22:02 灬从此以后灬 阅读(274) 评论(0) 推荐(0) 编辑
摘要: https://www.nowcoder.com/acm/contest/submit/0dff89ad7b8444719df155d507f3e1dd?ACMContestId=3&tagId=4 解析 字符比较 水 AC代码 阅读全文
posted @ 2017-09-07 16:20 灬从此以后灬 阅读(171) 评论(0) 推荐(0) 编辑
摘要: VJ 该题 链接 https://vjudge.net/problem/UVA-1584 AC代码 字典序最小输出 阅读全文
posted @ 2017-09-07 15:53 灬从此以后灬 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 题目链接 http://poj.org/problem?id=3254 转自http://blog.csdn.net/harrypoirot/article/details/23163485 阅读全文
posted @ 2017-09-05 21:54 灬从此以后灬 阅读(154) 评论(0) 推荐(0) 编辑
摘要: CS Course Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 593 Accepted Submission(s): 288 Problem 阅读全文
posted @ 2017-09-04 22:52 灬从此以后灬 阅读(149) 评论(0) 推荐(0) 编辑
摘要: A Math Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 817 Accepted Submission(s): 344 Pr 阅读全文
posted @ 2017-09-04 21:10 灬从此以后灬 阅读(126) 评论(0) 推荐(0) 编辑