快速幂
Apollo_Dou
这个作者很懒,什么都没留下…
展开
-
Enormous Carpet
Enormous Carpet Ameer is an upcoming and pretty talented problem solver who loves to solve problems using computers. Lately, He bought a very very very large square carpet that has an enormous area, s原创 2017-04-06 21:47:33 · 456 阅读 · 0 评论 -
ZOJ-2317 Nice Patterns Strike Back
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2317题意:给一个N*M的矩阵,填黑、白两种颜色,问其中不能有2*2的矩阵是一样颜色的方案数?方案数太大,输出%p之后的结果。思路:N<10^100,M<=5,一看数据范围就能猜到是在M上研究。因为M非常小,所以我们可以枚举每一列的状态,总共只有2^5=32中状态,这原创 2017-07-20 11:28:42 · 325 阅读 · 0 评论