
思路
文章平均质量分 77
ToRe.
这个作者很懒,什么都没留下…
展开
-
ZOJ 2316 Matrix Multiplication(思路)
题目链接题意给你一个 n∗nn*nn∗n 的矩阵AAA,求 A∗ATA*A^TA∗AT所有元素和给你 mmm 条关系 <u,v><u,v><u,v> 表示Auv=Avu=1A_{uv}=A_{vu}=1Auv=Avu=1思路由于矩阵对称A∗AT=A∗A=E∗A∗AA*A^T=A*A=E*A*AA∗AT=A∗A=E∗...原创 2019-04-07 18:49:08 · 266 阅读 · 1 评论 -
HihoCoder 1873 Frog and Portal(二进制拆分)
题目链接题意一只青蛙想从0点到200点,在1-199上每点存在荷叶,荷叶上可以放置传送门,从某点立即瞬移到另一个点,一个点只有一个传送门。青蛙每次可以跳一步或者两步。问从0到200存在m个方案数的传送门放置方法思路首先无传送门显然方案数是斐波那契数列点123456789方案12358132134543点传送门指向本身1...原创 2018-11-14 21:11:44 · 661 阅读 · 0 评论 -
Codeforces Round #431 (Div. 2) ——C. From Y to Y(思路)
From beginning till end, this message has been waiting to be conveyed.For a given unordered multiset of n lowercase English letters ("multi" means that a letter may appear more than once), we treat al...原创 2018-04-02 17:47:41 · 247 阅读 · 0 评论 -
HDU 1173 采矿(思路)
Problem Description某天gameboy玩魔兽RPG。有一个任务是在一个富含金矿的圆形小岛上建一个基地,以最快的速度采集完这个小岛上的所有金矿。这个小岛上有n(0<n<1000000)个金矿,每个金矿的矿藏量是相等的。而且这个小岛的地势非常平坦,所以基地可以建在小岛的任何位置,每个金矿的采矿速度只跟矿藏到基地的路程长度有关。为了不让这个任务太无聊,游戏设计者对这个小岛施...原创 2018-03-28 09:46:07 · 478 阅读 · 0 评论 -
NBUT 1651 Red packet (思路)
问题描述New Year is coming! Our big boss Wine93 will distribute some “Red Package”, just like Alipay and Wechat.Wine93 has m yuan, he decides to distribute them to n people and everyone can get some money...原创 2018-03-23 09:05:54 · 245 阅读 · 0 评论 -
HDU 1165 Eddy's research II(递推)
Problem DescriptionAs is known, Ackermann function plays an important role in the sphere of theoretical computer science. However, in the other hand, the dramatic fast increasing pace of the funct原创 2018-01-30 15:35:32 · 261 阅读 · 2 评论 -
ZOJ 3261 Connections in Galaxy War(逆向并查集)
In order to strengthen the defense ability, many stars in galaxy allied together and built many bidirectional tunnels to exchange messages. However, when the Galaxy War began, some tunnels were dest原创 2018-01-25 10:36:59 · 244 阅读 · 0 评论 -
Codeforces Round #456 (Div. 2) ——B. New Year's Eve(思路)
CF2018年的第一场比赛,这也是我第一次打CF,发现挺有意思的。本人太弱只能去写写签到题,B题以为是搜索或者贪心卡了好久,1个小时过去了才发现有规律,一发Pretest Passed,然后一直没人hack以为稳了。比赛结束竟然FST了 (⋟﹏⋞),查看源代码发现竟然是少输入了一个值ORZ,感觉自己像个智障,好像本来就是。B. New Year's Ev原创 2018-01-06 13:05:21 · 1018 阅读 · 0 评论 -
“玲珑杯”ACM比赛 Round #23 C -- 你居然不吃巧克力(思路)
给定一个正整数n,现在有n个石头,每个单独成一堆。现在可以每次合并两堆石头,产生的能量为两堆石头个数的min。你现在要将所有的石头合并成一堆,并且获得的能量最大。输出这个最大值。原创 2017-12-31 13:53:53 · 312 阅读 · 0 评论 -
牛客网 Wannafly挑战赛6 逆序对(思路)
时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 131072K,其他语言262144K64bit IO Format: %lld题目描述求所有长度为n的01串中满足如下条件的二元组个数:设第i位和第j位分别位ai和aj(ii=1,aj=0。答案对1e9+7取模。输入描述:输入一个n。输出描述:输出答案对1e9+7取模原创 2017-12-22 21:17:38 · 349 阅读 · 0 评论 -
CodeForces 858B Which floor?
题目:B. Which floor?time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn a building where Polycarp lives原创 2017-11-09 16:24:54 · 416 阅读 · 0 评论