上一页 1 ··· 6 7 8 9 10 11 下一页
摘要: 题目链接:http://poj.org/problem?id=2251 题目: Description You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of 阅读全文
posted @ 2018-04-30 21:21 Dillonh 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1182 题目: Description 动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。 有人用 阅读全文
posted @ 2018-04-30 00:35 Dillonh 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2842 题目: Problem Description Dumbear likes to play the Chinese Rings (Baguenaudier). It’s a game played 阅读全文
posted @ 2018-04-29 22:22 Dillonh 阅读(840) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/problemset/problem/185/A 题目: Dwarfs have planted a very interesting plant, which is a triangle directed "upwards". This pla 阅读全文
posted @ 2018-04-29 22:09 Dillonh 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1575 题目: Problem Description A为一个方阵,则Tr A表示A的迹(就是主对角线上各项的和),现要求Tr(A^k)%9973。 Input 数据的第一行是一个T,表示有T组数据。每 阅读全文
posted @ 2018-04-29 21:58 Dillonh 阅读(1264) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1757 思路:矩阵快速幂模板题,不过因为刚刚入门矩阵快速幂,所以经常把数组f存反,导致本地错误一晚,差点心态爆炸…… 代码实现如下: 阅读全文
posted @ 2018-04-27 21:16 Dillonh 阅读(428) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.nowcoder.com/acm/contest/105/G 思路:这题一看数据范围就知道是个矩阵快速幂,通过构造矩阵知我们需要的转移矩阵为下图形式,不过需要特判1然后输出的是n-1的结果哦,因为这个我本题WA了==!矩阵快速幂最难得就是构造矩阵,当矩阵构造出来之后 阅读全文
posted @ 2018-04-27 17:30 Dillonh 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 这个的意思是将a翻转过来与a相减的绝对值 1 int t; 2 string a, b; 3 int m[maxn; 4 5 void BigInteger_subtract(string a, string b) { 6 memset(m, 0, sizeof(m)); 7 int len = a.size(); 8 for(int i = len - ... 阅读全文
posted @ 2018-04-22 19:36 Dillonh 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2544 Problem Description 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们 阅读全文
posted @ 2018-04-20 22:47 Dillonh 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.csu.edu.cn/csuoj/problemset/problem?pid=2021 Description Everybody loves big numbers (if you do not, you might want to stop reading at 阅读全文
posted @ 2018-04-20 16:55 Dillonh 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=2478 Description The Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b wit 阅读全文
posted @ 2018-04-18 21:50 Dillonh 阅读(1139) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.csu.edu.cn/csuoj/problemset/problem?pid=2021 Description Everybody loves big numbers (if you do not, you might want to stop reading at 阅读全文
posted @ 2018-04-18 21:29 Dillonh 阅读(905) 评论(0) 推荐(0) 编辑
摘要: 欧拉函数 欧拉函数的定义:1~N中与N互质的数的个数被称为欧拉函数,我们用phi[i]来记录与i互质的数的个数。 根据算数基本定理(唯一分解定理),即N可以分解成N=p1^c1*p2^c2*…pm^cm,其中pi为质数可以推出phi[N]=N * (p1 - 1) / p1 * (p2 - 1) / 阅读全文
posted @ 2018-04-17 19:17 Dillonh 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 链接:https://www.nowcoder.com/acm/contest/96#question 持续更新ing,请多多关注~ A.LL 题目描述: “LL是什么?这都不知道的话,别说自己是程序猿啊!” “longlong?” “。。。肯定是LoveLive啊!” qwb为了检验你是否是真正的 阅读全文
posted @ 2018-04-14 20:31 Dillonh 阅读(1013) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1114 题面: Problem Description Before ACM can do anything, a budget must be prepared and the necessary fi 阅读全文
posted @ 2018-04-12 23:18 Dillonh 阅读(636) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1269 题面: Description We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a 阅读全文
posted @ 2018-04-11 13:34 Dillonh 阅读(647) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2119 题面:Morleys theorem states that that the line 阅读全文
posted @ 2018-04-10 16:59 Dillonh 阅读(590) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=2318 题面: TOYS Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 17413 Accepted: 8300 Description Calculate the 阅读全文
posted @ 2018-04-09 19:14 Dillonh 阅读(646) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/problemset/problem/567/B 题目描述: Berland National Library has recently been built in the capital of Berland. In addition, in 阅读全文
posted @ 2018-04-03 17:09 Dillonh 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.patest.cn/contests/gplt/L2-017 题目: 社交网络中我们给每个人定义了一个“活跃度”,现希望根据这个指标把人群分为两大类,即外向型(outgoing,即活跃度高的)和内向型(introverted,即活跃度低的)。要求两类人群的规模尽可能 阅读全文
posted @ 2018-03-29 11:16 Dillonh 阅读(410) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 下一页