上一页 1 ··· 3 4 5 6 7 8 下一页
摘要: 最近刷了一下斐波那契数的题,学了一下矩阵快速幂,做一下总结。 首先在学矩阵快速幂之前,有一些必须要掌握的知识。 1)矩阵的乘法(详细介绍请参考百度百科) 其中的c[i, j]是a矩阵中的第i行与b矩阵中第j列的乘积和。 例: 所以说可以写成是 。 用代码实现就是 1 void mult(int Fi 阅读全文
posted @ 2017-04-07 13:22 Dh_q 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 原题:http://codeforces.com/problemset/problem/510/C C. Fox And Names time limit per test:2 seconds memory limit per test:256 megabytes input:standard in 阅读全文
posted @ 2017-04-05 14:11 Dh_q 阅读(762) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://cn.vjudge.net/problem/UVA-10305(忍不住uva连接满) John has n tasks to do. Unfortunately, the tasks are not independent and the execution of one 阅读全文
posted @ 2017-04-05 13:59 Dh_q 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 最近刷了几题拓扑排序的题,记录一下拓扑排序 在有向图中,并且按照一定的规则(题目所给的规则)排序。如果图中出现了有向环的话就无法排序了。 附上相关题目:1)http://codeforces.com/problemset/problem/510/C 阅读全文
posted @ 2017-04-05 13:44 Dh_q 阅读(445) 评论(0) 推荐(0) 编辑
摘要: 原题链接:http://www.gdutcode.sinaapp.com/problem.php?cid=1057&pid=4 Problem E: 倒水(Water) Description 一天,CC买了N个容量可以认为是无限大的瓶子,开始时每个瓶子里有1升水。接着~~CC发现瓶子实在太多了,于 阅读全文
posted @ 2017-04-04 23:59 Dh_q 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 原题连接:https://odzkskevi.qnssl.com/1110bec98ca57b5ce6aec79b210d2849?v=1491063604 题意: 多组输入,每一次输入一个n(字符串的长度),一个m(下面m条关系),一个字符串s,m条关系(要求x, y位的字符相等)。 字符串中有一 阅读全文
posted @ 2017-04-04 20:18 Dh_q 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 原题链接 https://odzkskevi.qnssl.com/1110bec98ca57b5ce6aec79b210d2849?v=1491063604 *********************************************************************** 阅读全文
posted @ 2017-04-04 19:59 Dh_q 阅读(329) 评论(0) 推荐(0) 编辑
摘要: Downward paths Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 844 Accepted Submission(s): 282 Pr 阅读全文
posted @ 2017-04-04 19:41 Dh_q 阅读(360) 评论(0) 推荐(0) 编辑
摘要: 原题目 A Magic Lamp Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3964 Accepted Submission(s): 160 阅读全文
posted @ 2017-04-04 19:35 Dh_q 阅读(259) 评论(0) 推荐(0) 编辑
摘要: Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement There are 3N participants in AtCoder Group Contest. The strength of the  阅读全文
posted @ 2017-04-02 00:43 Dh_q 阅读(144) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 下一页