![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数学
wchhlbt
这个作者很懒,什么都没留下…
展开
-
哈尔滨理工大学软件学院ACM程序设计全国邀请赛 F Fibonacci Again (矩阵快速幂)
解题思路:解决本题的一个关键就是发现其表达式和原来的斐波那契数列的不同,通过打表分析观察,可以发现一个以6为周期的循环。原创 2016-12-03 19:11:38 · 961 阅读 · 1 评论 -
codeforces 560E Gerald and Giant Chess (dp + 组合数)
题目原文:http://codeforces.com/contest/560/problem/EE. Gerald and Giant ChessGiant chess is quite common in Geraldion. We will not delve into the rules of the game, we'll just say that the gam原创 2017-05-11 20:18:32 · 358 阅读 · 0 评论 -
codeforces 560C Gerald's Hexagon (数学+思维)
题目原文:http://codeforces.com/contest/560/problem/CGerald got a very curious hexagon for his birthday. The boy found out that all the angles of the hexagon are equal to. Then he measured the leng原创 2017-05-11 20:01:39 · 285 阅读 · 0 评论 -
codeforces 803F Coprime Subsequences (容斥原理)
题目原文:http://codeforces.com/problemset/problem/803/FF. Coprime SubsequencesLet's call a non-empty sequence of positive integersa1, a2...akcoprime if the greatest common divisor of all原创 2017-05-01 11:13:59 · 940 阅读 · 0 评论 -
UvaLive 3704 Cellular Automaton (矩阵快速幂)
解题思路:最简单的思路是构造 n*n 矩阵来实现每次求和的过程。但是矩阵乘积的复杂度是 O(n^3) 的。再多一个log的复杂度可能就难以承受了。所以要想一想有没有办法能够降低复杂度。由题意可知,构造出来的系数矩阵一定是一个循环矩阵,每一行都是由上一行向左平移一个单位形成的。原创 2017-03-26 11:09:54 · 637 阅读 · 0 评论 -
codeforces 785D Anton and School - 2(组合恒等式)
题目大意:http://codeforces.com/problemset/problem/785/D As you probably know, Anton goes to school. One of the school subjects that Anton studies is Bracketology. On the Bracketology lessons students usua原创 2017-03-18 16:10:22 · 959 阅读 · 0 评论 -
Josephus Problem (约瑟夫环数学解法)
约瑟夫环是一个非常经典的数学问题,n个人围成一圈,从1开始报数,每当有人报到m时,他被淘汰,下一个人继续从1开始报数,问最后的获胜者是谁? 有一种很经典的算法是用链表/数组来模拟整个游戏的过程,但是当n , m 都很大的时候这个方法就显然行不通了。有没有更便捷的方式来解决这个问题呢? 我们可以从数学的角度来分析一下这个问题。首先我们通过思考可以得到一个很显然的结论,n原创 2017-03-14 19:58:03 · 4038 阅读 · 0 评论 -
hdu 1133 Buy the Ticket(卡特兰数+大整数)
题目原文:http://acm.hdu.edu.cn/showproblem.php?pid=1133The "Harry Potter and the Goblet of Fire" will be on show in the next few days. As a crazy fan of Harry Potter, you will go to the cinema and have原创 2017-02-26 15:43:40 · 384 阅读 · 0 评论 -
codeforces 776C Molly's Chemicals (数学+二分法)
题目原文:Molly Hooper hasn different kinds of chemicals arranged in a line. Each of the chemicals has an affection value, The i-th of them has affection value ai.Molly wants Sherlock to fall i原创 2017-02-24 14:18:40 · 449 阅读 · 0 评论 -
codeforces 818E Card Game Again (尺取法)
题目原文:http://codeforces.com/contest/818/problem/EE. Card Game AgainVova again tries to play some computer card game.The rules of deck creation in this game are simple. Vova is given a原创 2017-08-02 11:51:54 · 1402 阅读 · 0 评论