自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 收藏
  • 关注

转载 Block Breaker HDU - 6699(深搜,水,写下涨涨记性)

Problem DescriptionGiven a rectangle frame of size n×m. Initially, the frame is strewn with n×m square blocks of size 1×1. Due to the friction with the frame and each other, the blocks are stab...

2019-08-21 21:56:00 226

转载 A + B for you again HDU - 1867(最大前缀&最大后缀的公共子缀&kmp删除法)

Problem DescriptionGenerally speaking, there are a lot of problems about strings processing. Now you encounter another such problem. If you get two strings, such as“asdf”and“sdfg”, the res...

2019-08-19 10:32:00 131

转载 Is It A Tree? POJ - 1308(并查集判树)

Problem DescriptionA tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the fol...

2019-08-19 09:23:00 106

转载 剪花布条 HDU - 2087(kmp,求不重叠匹配个数)

Problem Description一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢?Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会...

2019-08-17 23:11:00 137

转载 Colossal Fibonacci Numbers! UVA - 11582(快速幂,求解)

Problem DescriptionThe i’th Fibonacci number f(i) is recursively defined in the following way:•f(0) = 0 and f(1) = 1•f(i + 2) = f(i + 1) + f(i) for every i ≥ 0Your task is to compute som...

2019-08-16 20:16:00 92

转载 Simple Library Management System HDU - 1497(图书管理系统)

Problem DescriptionAfter AC all the hardest problems in the world , the ACboy 8006 now has nothing to do . One day he goes to an old library to find a part-time job .It is also a big library w...

2019-08-16 16:33:00 176

转载 Equations HDU - 1496(哈希的应用)

Problem DescriptionConsider equations having the following form:a*x1^2+b*x2^2+c*x3^2+d*x4^2=0a, b, c, d are integers from the interval [-50,50] and any of them cannot be 0.It is consider a s...

2019-08-16 15:42:00 114

转载 Oulipo POJ - 3461(kmp,求重叠匹配个数)

Problem DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter'e'. He was a member of the Oulipo group. A quote from the book:Tout avai...

2019-08-16 11:31:00 85

转载 最长回文 HDU - 3068(马拉车算法)

Problem Description给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度.回文就是正反读都是一样的字符串,如aba, abba等Input输入有多组case,不超过120组,每组输入为一行小写英文字符a,b,c...y,z组成的字符串S两组case之间由空行隔开(该空行不用处理)字符串长度len <= 1100...

2019-08-16 10:09:00 170

转载 Wireless Network(并查集)

Problem DescriptionAn earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock at...

2019-08-15 22:26:00 61

转载 食物链(并查集)

Problem Description动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。有人用两种说法对这N个动物所构成的食物链关系进行描述:第一种说法是"1 X Y",表示X和Y是同类。第二种说法是"2 X Y",表示X吃Y。此人对N个动...

2019-08-15 15:31:00 743

转载 约瑟夫环

n个人围成一个圈,从第一个人开始编号(1,2,… ,n),从第一个人开始顺序报号1,2,3。凡报到3者退出圈子。找出最后留在圈子中的人原来的序号。要求用链表实现。输入格式:输入在一行中给出一个n,代表n个人围成一个圈(0<n<=100000)。输出格式:输出最后留在圈子中的人原来的序号,占一行。输入样例:10输出样例:4#inclu...

2019-08-15 14:54:00 102

转载 成绩排序Ⅱ(简单排序)

期中考试结束了,老师已经批改完试卷了,但老师实在太忙了,想要写一个程序将所有学生的成绩信息处理一下,要求按照成绩的高低顺序输出各个学生的信息。输入格式:第一行输入一个n,代表有n个学生。接下来有n行,每一行中给出一名学生的学号num,姓名name,成绩score。学生人数0<n<=1000,学号为11位整型,保证学号各不相同,姓名为长度不超过20字符串,成绩为浮点型(...

2019-08-15 14:52:00 419

转载 成绩排序Ⅰ(简单排序)

期中考试结束了,老师已经批改完试卷了,但老师实在太忙了,想要写一个程序将所有学生的成绩信息处理一下,要求按照成绩降序输出各个学生的信息。输入格式:第一行输入一个n,代表有n个学生。接下来有n行,每一行中给出一名学生的学号num,姓名name,成绩score。学生人数0<n<=1000,学号11位整型,姓名为字符串,且长度不超过20,成绩为浮点型,保证每个学生的成绩各不...

2019-08-15 11:14:00 292

转载 Number of Containers ZOJ - 3175(数论题)

Problem DescriptionFor two integersmandk,kis said to be a container ofmifkis divisible bym. Given 2 positive integersnandm(m<n),the function f(n,m) is defined to be the nu...

2019-08-15 09:51:00 239

转载 Ugly Numbers UVA - 136(优先队列+vector)

Problem DescriptionUgly numbers are numbers whose only prime factors are 2, 3 or 5.The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, ...shows the first 11 ugly numbers.By convention, 1 is in...

2019-08-15 09:18:00 103

转载 Mathematically Hard LightOJ-1007(欧拉定理+前缀和)

DescriptionMathematically some problems look hard. But with the help of the computer, some problems can be easily solvable.In this problem, you will be given two integersaandb. You have to...

2019-08-13 23:52:00 178

转载 GCD and LCM HDU - 4497(质因数分解)

Problem DescriptionGiven two positive integers G and L, could you tell me how many solutions of (x, y, z) there are, satisfying that gcd(x, y, z) = G and lcm(x, y, z) = L?Note, gcd(x, y, z...

2019-08-13 23:26:00 184

转载 A/B HDU-1576(简单的数论题)

Problem Description要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。Input数据的第一行是一个T,表示有T组数据。每组数据有两个数n(0 <= n < 9973)和B(1 <= B <= 10^9)。Output对应每组数据输出(A/B)%99...

2019-08-13 10:34:00 161

转载 Prime Time UVA - 10200(精度处理,素数判定)

Problem DescriptionEuler is a well-known matematician, and, among many other things, he discovered that the formulan^{2} + n + 41n2+n+41produces a prime for0 ≤ n &lt; 400≤n<40. F...

2019-08-13 00:21:00 145

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除