08 2018 档案
摘要:DNA Sequence Description It's well known that DNA Sequence is a sequence only contains A, C, T and G, and it's very useful to analyze a segment of DNA
阅读全文
摘要:Keywords Search Problem Description In the modern time, Search engine came into the life of everybody like Google, Baidu, etc.Wiskey also wants to bri
阅读全文
摘要:Period Problem Description For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we
阅读全文
摘要:Cyclic Nacklace Problem Description CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any s
阅读全文
摘要:Number Sequence Problem Description Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N
阅读全文
摘要:免费馅饼 Problem Description 都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接
阅读全文
摘要:Super Jumping! Jumping! Jumping! Problem Description Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU.
阅读全文
摘要:Problem Description Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ourselves to more diffi
阅读全文
摘要:最短路算法简单模板 一.floyed算法 首先对于floyed算法来说就是最短路径的动态规划解法,时间复杂度为O(n^3) 适用于图中所有点与点之间的最短路径的算法,一般适用于点n较小的情况。 Floyed算法有三层循环,循环的层次先后顺序也是比较重要的,分别为k ,i,j;因为dis[k][i][
阅读全文
摘要:Description A county consists of n cities (labeled 1, 2, …, n) connected by some bidirectional roads. Each road connects a pair of distinct cities. A
阅读全文
摘要:Description In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want
阅读全文
摘要:Description N (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all know, some cows code better than o
阅读全文
摘要:Description While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-
阅读全文
摘要:Description One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤
阅读全文
摘要:Description Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who t
阅读全文
摘要:Description Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to vis
阅读全文
摘要:题目链接:http://poj.org/problem?id=2387 题意:有n个城市点,m条边,求n到1的最短路径。n<=1000; m<=2000 就是一个标准的最短路模板。
阅读全文
摘要:Description The Pizazz Pizzeria prides itself in delivering pizzas to its customers as fast as possible. Unfortunately, due to cutbacks, they can affo
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1565 思路:跟上一篇 POJ 的状压dp很类似在这里就不过多阐述了
阅读全文
摘要:Description Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some
阅读全文
摘要:题目描述 给定一个长度为n的数列{ai}(i=1,2,3,...,n)。 定义满足ai<=ai+1为单调不减数列。 现在你可以对原数列进行如下两种操作: 1)将数列中任意1个数字加1; 2)将数列中任意1个数字减1. 问:最少操作多少次可以将原数列变为单调不减数列。 给定一个长度为n的数列{ai}(
阅读全文
摘要:1307 绳子与重物 题目来源: Codility 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注 1307 绳子与重物 题目来源: Codility 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 1307 绳子与
阅读全文
摘要:思路:设只有一颗子树的节点有ans个设前序边历数组为pre[100],后序遍历数组为pos[100];前序遍历的第二个元素是A的一个子节点左右节点不知,设ax-ay表示一个树的前序遍历,bx-by表示后序遍历,可知如果pre[ax+1] = pos[i] 且 i = by-1,上一个根节点只有一个子
阅读全文
摘要:总结:这一次的百度之星之行到这里也就结束了,充分的认识到了自己的不足啊。。。果然还是做的题太少,,见识的题型也还太少,对于STL的掌握还是不够到位啊!!(STL大法是真的好,建议大家认认真真的好好学学),这一次在一群大佬中被狂虐,下来之后还是继续刷题吧,希望明年继续加油!!!(共勉,加油!) A.
阅读全文
摘要:思路: 根据矩阵乘法的定义,G中的第i行第j列的元素 ai,j ,对答案的贡献为 ai,j∗ T中第j行的所有元素之和。 因此我们可以将T中根据每行的和进行排序。第i行的和可以通过公式 (ai^n−1)/(ai−1)直接得出。 注意考虑 ai=1,ai=0 以及 ai>MOD 的特殊情况即可。还有就
阅读全文
摘要:1113 矩阵快速幂 基准时间限制:3 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 1113 矩阵快速幂 基准时间限制:3 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 1113 矩阵快速幂 基准时间限制:3 秒 空间限制:131072 KB 分值: 40
阅读全文
摘要:1282 时钟 题目来源: Codility 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 1282 时钟 题目来源: Codility 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 1282 时钟 题目来源: Codili
阅读全文
摘要:挑剔的美食家 基准时间限制:1 秒 空间限制:131072 KB 分值: 5 挑剔的美食家 基准时间限制:1 秒 空间限制:131072 KB 分值: 5 挑剔的美食家 基准时间限制:1 秒 空间限制:131072 KB 分值: 5 与很多奶牛一样,Farmer John那群养尊处优的奶牛们对食物越
阅读全文
摘要:1281 山峰和旗子 题目来源: Codility 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 1281 山峰和旗子 题目来源: Codility 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 1281 山峰和旗子 题目来
阅读全文
摘要:P1462 通往奥格瑞玛的道路 题目背景 在艾泽拉斯大陆上有一位名叫歪嘴哦的神奇术士,他是部落的中坚力量 有一天他醒来后发现自己居然到了联盟的主城暴风城 在被众多联盟的士兵攻击后,他决定逃回自己的家乡奥格瑞玛 题目描述 在艾泽拉斯,有n个城市。编号为1,2,3,...,n。 城市之间有m条双向的公路
阅读全文
摘要:1287 加农炮 题目来源: Codility 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 1287 加农炮 题目来源: Codility 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 1287 加农炮 题目来源: Cod
阅读全文
摘要:A.调查问卷 A.调查问卷 度度熊为了完成毕业论文,需要收集一些数据来支撑他的论据,于是设计了一份包含 mm 个问题的调查问卷,每个问题只有 'A' 和 'B' 两种选项。 将问卷散发出去之后,度度熊收到了 nn 份互不相同的问卷,在整理结果的时候,他发现可以只保留其中的一部分问题,使得这 nn 份
阅读全文
摘要:题目描述 In order to become a magical girl, Thinking-Bear are learning magic circle. He first drew a regular polygon of N sides, and the length of each si
阅读全文
摘要:1265 四点共面 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注 1265 四点共面 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 1265 四点共面 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基
阅读全文
摘要:1202 子序列个数 题目来源: 福州大学 OJ 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注 1202 子序列个数 题目来源: 福州大学 OJ 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 1202 子序列个数
阅读全文

浙公网安备 33010602011771号