矩阵快速幂
文章平均质量分 90
overload1997
努力 努力 再努力
展开
-
poj 3735 Training little cats
Facer's pet cat just gave birth to a brood of little cats. Having considered the health of those lovely cats, Facer decides to make the cats to do some exercises. Facer has well designed a set of move原创 2016-11-07 23:36:08 · 261 阅读 · 0 评论 -
哈尔滨理工大学软件学院ACM程序设计全国邀请赛(网络同步赛)F Fibonacci Again
手推一下发现每6个为一节,然后就能构造出矩阵,然后就是矩阵快速幂了。下面给代码: #include #include #include #include typedef long long ll; using namespace std; const int MOD=1e9+7; int n=7; ll b[20][20]={ {13,8,0,0,0,0,-2}, {8,5,0,原创 2016-12-03 17:55:41 · 742 阅读 · 0 评论