08 2018 档案
摘要:描述 上回说到,小Ho得到了一棵二叉树玩具,这个玩具是由小球和木棍连接起来的,而在拆拼它的过程中,小Ho发现他不仅仅可以拼凑成一棵二叉树!还可以拼凑成一棵多叉树——好吧,其实就是更为平常的树而已。 但是不管怎么说,小Ho喜爱的玩具又升级换代了,于是他更加爱不释手(其实说起来小球和木棍有什么好玩的是吧
阅读全文
摘要:题解报告:hdu 2082 找单词(母函数) Problem Description 假设有x1个字母A, x2个字母B,..... x26个字母Z,同时假设字母A的价值为1,字母B的价值为2,..... 字母Z的价值为26。那么,对于给定的字母,可以找到多少价值<=50的单词呢?单词的价值就是组成
阅读全文
摘要:描述: 有一个牧场,牧场上有很多个供水装置,现在牧场的主人想要用篱笆把这些供水装置圈起来,以防止不是自己的牲畜来喝水,各个水池都标有各自的坐标,现在要你写一个程序利用最短的篱笆将这些供水装置圈起来!(篱笆足够多,并且长度可变) 输入: 第一行输入的是N,代表用N组测试数据(1<=N<=10)第二行输
阅读全文
摘要:题解报告:hdu 2036 改革春风吹满地 (求多边形的面积) Problem Description “ 改革春风吹满地,不会AC没关系;实在不行回老家,还有一亩三分地。谢谢!(乐队奏乐)”话说部分学生心态极好,每天就知道游戏,这次考试如此简单的题目,也是云里雾里,而且,还竟然来这么几句打油诗。好
阅读全文
摘要:Description Once upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greedy,
阅读全文
摘要:Problem Description There are a lot of trees in an area. A peasant wants to buy a rope to surround all these trees. So at first he must know the minim
阅读全文
摘要:Problem Description My birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and
阅读全文
摘要:Problem Description Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numb
阅读全文
摘要:Problem Description People in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with value
阅读全文
摘要:Problem Description Speakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless没有多少钱,总共只攒了n万美元。他将在m个学校中选择若干的(当然
阅读全文
摘要:Problem Description FatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on a collection of m
阅读全文
摘要:Problem Description Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and kno
阅读全文
摘要:Description A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence ( a1, a2, ..., aN) be any seq
阅读全文
摘要:Description An array of size n ≤ 106 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very
阅读全文
摘要:Description A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have
阅读全文
摘要:Description Jessica's a very lovely girl wooed by lots of boys. Recently she has a problem. The final exam is coming, yet she has spent little time on
阅读全文
摘要:Description A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) ar
阅读全文
摘要:描述: 直接说题意,完全背包定义有N种物品和一个容量为V的背包,每种物品都有无限件可用。第i种物品的体积是c,价值是w。求解将哪些物品装入背包可使这些物品的体积总和不超过背包容量,且价值总和最大。本题要求是背包恰好装满背包时,求出最大价值总和是多少。如果不能恰好装满背包,输出NO。 输入: 第一行:
阅读全文
摘要:Problem Description Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this actio
阅读全文
摘要:Problem Description Whuacmers use coins.They have coins of value A1,A2,A3...An Silverland dollar. One day Hibix opened purse and found there were some
阅读全文
摘要:Problem Description Marsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal shar
阅读全文
摘要:Problem Description Nowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College had
阅读全文
摘要:Problem Description 急!灾区的食物依然短缺!为了挽救灾区同胞的生命,心系灾区同胞的你准备自己采购一些粮食支援灾区,现在假设你一共有资金n元,而市场有m种大米,每种大米都是袋装产品,其价格不等,并且只能整袋购买。请问:你用有限的资金最多能采购多少公斤粮食呢?后记:人生是一个充满了变
阅读全文
摘要:Problem Description 电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜
阅读全文
摘要:Problem Description The company "21st Century Fruits" has specialized in creating new sorts of fruits by transferring genes from one fruit into the ge
阅读全文
摘要:Description You have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you
阅读全文
摘要:Problem Description 有一台机器,并且给你这台机器的工作表,工作表上有n个任务,机器在ti时间执行第i个任务,1秒即可完成1个任务。有m个询问,每个询问有一个数字q,表示如果在q时间有一个工作表之外的任务请求,请计算何时这个任务才能被执行。机器总是按照工作表执行,当机器空闲时立即执
阅读全文
摘要:J-plan(贪心) 题目描述 There are n students going to travel. And hotel has two types room:double room and triple room. The price of a double room is p2 and t
阅读全文
摘要:描述 现在有"abcdefghijkl”12个字符,将其所有的排列中按字典序排列,给出任意一种排列,说出这个排列在所有的排列中是第几小的? 输入 第一行有一个整数n(0<n<=10000);随后有n行,每行是一个排列; 输出 输出一个整数m,占一行,m表示排列是第几位; 样例输入 样例输出 解题思路
阅读全文
摘要:描述 现在有"abcdefghijkl”12个字符,将其按字典序排列,如果给出任意一种排列,我们能说出这个排列在所有的排列中是第几小的。但是现在我们给出它是第几小,需要你求出它所代表的序列. 输入 第一行有一个整数n(0<n<=10000);随后有n行,每行是一个整数m,它代表着序列的第几小; 输出
阅读全文
摘要:Description The branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number t
阅读全文
摘要:Problem Description A positive proper divisor is a positive divisor of a number n, excluding n itself. For example, 1, 2, and 3 are positive proper di
阅读全文
摘要:Description Write a program which reads an integer n and prints the number of prime numbers which are less than or equal to n. A prime number is a nat
阅读全文
摘要:素数的定义:除了1和它本身之外,不能被其他整数整除。 一、判定一个正整数n是否为素数的方法: ①定义法:枚举2~n-1这n-2个正整数,如果它们均不能整除n,则可断定n为素数。代码如下:时间复杂度为O(n),如果n为10^9,就不能用此方法。 ②从2开始枚举到不大于sqrt(n)的所有正整数,如果它
阅读全文
摘要:一句话:只需将两个大数按照竖式模拟计算即可! 高精度加法: 题解报告:hdu 1002 A + B Problem II Problem Description I have a very simple problem for you. Given two integers A and B, you
阅读全文
摘要:Description Suppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. Th
阅读全文
摘要:Description In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping
阅读全文
摘要:Description Japan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the
阅读全文
摘要:Problem Description Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let
阅读全文
摘要:题目描述 Description 给你N个数,有两种操作: 1:给区间[a,b]的所有数增加X 2:询问区间[a,b]的数的和。 题目描述 Description 给你N个数,有两种操作: 1:给区间[a,b]的所有数增加X 2:询问区间[a,b]的数的和。 给你N个数,有两种操作: 1:给区间[a
阅读全文
摘要:题目描述 如题,已知一个数列,你需要进行下面两种操作: 1.将某区间每一个数数加上x 2.求出某一个数的值 输入输出格式 输入格式: 第一行包含两个整数N、M,分别表示该数列数字的个数和操作的总个数。 第二行包含N个用空格分隔的整数,其中第i个数字表示数列第i项的初始值。 接下来M行每行包含2或4个
阅读全文
摘要:题目描述 Apojacsleam喜欢数组。 他现在有一个n个元素的数组a,而他要对a[L]-a[R]进行M次操作: 操作一:将a[L]-a[R]内的元素都加上P 操作二:将a[L]-a[R]内的元素都减去P 最后询问a[l]-a[r]内的元素之和? 请认真看题干及输入描述。 输入描述: 输入共M+3
阅读全文
摘要:题目描述 Apojacsleam是一个喜欢特殊时刻的人。 他定义了一个时刻,若电子表显示ab:ba(24小时制),则该时刻为“回文时刻”(可以有前导零)。例如00:00就是回文时刻。 给定一个时刻,求此时刻的上一个和下一个回文时刻。 J题附加:00:00就是24:00,没有24:00这一时刻 J题附
阅读全文
摘要:题目描述 输入描述: 输入数据共一行,一个正整数n,意义如“问题描述”。 输出描述: 输出一行描述答案:一个正整数k,表示S的末尾有k个0 <!-- <br/> <h5 style="font-size:14px;font-weight:bold;">输入例子:</h5> <pre>10</pre>
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1124 Problem Description The most important part of a GSM network is so called Base Transceiver Station
阅读全文
摘要:方法一:假设N!=K*10M,K不能被10整除,那么N!尾数就有M个0。再对N!进行质因子分解:N!=2x*3y*5z...由于10=2*5,即每一对2和5相乘都可以得到1个0,所以M只与指数x、z有关,并且M=min(x,z)(x,z分别为N!的中因子2,因子5的个数)。因为N!中每两个数字就有一
阅读全文
摘要:Description Every morning when they are milked, the Farmer John's cows form a rectangular grid that is R (1 <= R <= 10,000) rows by C (1 <= C <= 75) c
阅读全文
摘要:Description The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly
阅读全文
摘要:Problem Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Ouli
阅读全文
摘要:题目描述 We consider a positive integer perfect, if and only if it is equal to the sum of its positive divisors less than itself. For example, 6 is perfec
阅读全文
摘要:题目描述 In mathematics, matrix multiplication or matrix product is a binary operation that produces a matrix from two matrices with entries in a field, o
阅读全文
摘要:Description You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to
阅读全文
摘要:Problem Description In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several
阅读全文
摘要:Problem Description Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to
阅读全文
摘要:Problem Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N
阅读全文
摘要:Description Bessie hears that an extraordinary meteor shower is coming; reports say that these meteors will crash into earth and destroy anything they
阅读全文
摘要:Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,
阅读全文
摘要:Problem Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black til
阅读全文
摘要:Description Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0
阅读全文
摘要:Problem Description Sample Input 2 2 Sample Output 2 Hint 1. For N = 2, S(1) = S(2) = 1. 2. The input file consists of multiple test cases. 解题思路:由于指数很
阅读全文
摘要:Problem Description Given a positive integer N, you should output the most right digit of N^N. Input The input contains several test cases. The first
阅读全文
摘要:数数有多少 数数有多少 Time Limit: 2000/1000ms (Java/Others) Time Limit: 2000/1000ms (Java/Others) Problem Description: 小财最近新开了一家公司,招了n个员工,但是因为资金问题,办公楼只有m间办公室,于是
阅读全文
摘要:Description 小Ho未来有一个为期N天的假期,他计划在假期中看A部电影,刷B道编程题。为了劳逸结合,他决定先拿出若干天看电影,再拿出若干天刷题,最后再留若干天看电影。(若干代指大于0) 每天要么看电影不刷题,要么刷题不看电影;不会既刷题又看电影。并且每天至少看一部电影,或者刷一道题。现在小
阅读全文
摘要:Description The greatest common divisor GCD(a,b) of two positive integers a and b,sometimes written (a,b),is the largest divisor common to a and b,For
阅读全文
摘要:Description Given a positive integer N, your task is to calculate the sum of the positive integers less than N which are not coprime to N. A is said t
阅读全文
摘要:Description Most crossword puzzle fans are used to anagrams--groups of words with the same letters in different orders--for example OPTS, SPOT, STOP,
阅读全文
摘要:Description Andy, 8, has a dream - he wants to produce his very own dictionary. This is not an easy task for him, as the number of words that he knows
阅读全文
摘要:Description Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the beginning, Raju would place
阅读全文
摘要:物品分堆 物品分堆 Time Limit: 2000/1000ms (Java/Others) Time Limit: 2000/1000ms (Java/Others) Problem Description: 有n个物品,物品i的重量为Wi,现在想要把这个n个物品分类两堆,求最小的重量差(物品不
阅读全文

浙公网安备 33010602011771号