2018年2月8日

CodeForces - 385E Bear in the Field —— 矩阵快速幂

摘要: 题目链接:https://vjudge.net/problem/CodeForces-385E E. Bear in the Field time limit per test 1 second memory limit per test 256 megabytes input standard i 阅读全文

posted @ 2018-02-08 19:42 h_z_cong 阅读(341) 评论(0) 推荐(0) 编辑

UVA10518 How Many Calls? —— 矩阵快速幂

摘要: 题目链接:https://vjudge.net/problem/UVA-10518 题解: 问:求斐波那契数f[n]的时候调用了多少次f[n] = f[n-1] + f[n-2],没有记忆化,一直递归到f[0]、f[1],其中f[0]、f[1]也算调用了一次。 设求f[n]调用了S[n]次,则可知: 阅读全文

posted @ 2018-02-08 13:44 h_z_cong 阅读(185) 评论(0) 推荐(0) 编辑

导航