- 博客(43)
- 资源 (15)
- 收藏
- 关注
原创 HDOJ 2212 DFS
Problem Description A DFS(digital factorial sum) number is found by summing the factorial of every digit of a positive integer. For example ,consider the positive integer 145 = 1!+4!+5!, so it’s a DFS
2015-10-31 14:31:09 1758
原创 POJ 2260(ZOJ 1949) Error Correction 一个水题
DescriptionA boolean matrix has the parity property when each row and each column has an even sum, i.e. contains an even number of bits which are set. Here’s a 4 x 4 matrix which has the parity propert
2015-10-30 20:37:48 2180
原创 HDOJ 1716 排列2 next_permutation函数
Problem Description Ray又对数字的列产生了兴趣: 现有四张卡片,用这四张卡片能排列出很多不同的4位数,要求按从小到大的顺序输出这些4位数。Input 每组数据占一行,代表四张卡片上的数字(0<=数字<=9),如果四张卡片都是0,则输入结束。Output 对每组卡片按从小到大的顺序输出所有能由这四张卡片组成的4位数,千位数字相同的在同一行,同一行中每个四位数间用空格分隔。
2015-10-30 13:48:29 2008
原创 POJ 1159 Palindrome 最长公共子序列的问题
Description A palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to write a program which, given a string, determines the
2015-10-29 14:03:48 1785
转载 最长公共子序列和最长公共子串
什么是最长公共子序列呢?举个简单的例子吧,一个数列S,若分别是两个或多个已知序列的子序列,且是所有符合条件序列中最长的,则S称为已知序列的最长公共子序列。举例如下,如:有两个随机数列,1 2 3 4 5 6 和 3 4 5 8 9,则它们的最长公共子序列便是:3 4 5。之前一直不明白:最长公共子串和最长公共子序列的区别。最长公共子串(Longest Common Substirng)和最长公共子序
2015-10-29 13:46:37 1580
原创 POJ 2533 Longest Ordered Subsequence
DescriptionA numeric sequence of ai is ordered if a1 < a2 < … < aN. Let the subsequence of the given numeric sequence (a1, a2, …, aN) be any sequence (ai1, ai2, …, aiK), where 1 <= i1 < i2 < … < iK <=
2015-10-26 21:13:36 1757
原创 POJ 2487 Stamps
DescriptionBackground Everybody hates Raymond. He’s the largest stamp collector on planet earth and because of that he always makes fun of all the others at the stamp collector parties. Fortunately e
2015-10-26 19:41:31 1620
原创 HDOJ 1157 Who's in the Middle
Problem Description FJ is surveying his herd to find the most average cow. He wants to know how much milk this ‘median’ cow gives: half of the cows give as much or more than the median; half give as m
2015-10-26 19:32:46 1902
原创 POJ 2105 IP Address
Problem Description Suppose you are reading byte streams from any device, representing IP addresses. Your task is to convert a 32 characters long sequence of ‘1s’ and ‘0s’ (bits) to a dotted decimal f
2015-10-26 19:09:37 1604
原创 POJ 2027 No Brainer
Problem Description Zombies love to eat brains. Yum.Input The first line contains a single integer n indicating the number of data sets. The following n lines each represent a data set. Each data set
2015-10-26 19:07:10 1798
原创 HDOJ 1032(POJ 1207) The 3n + 1 problem
DescriptionProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algori
2015-10-26 19:01:33 1670
原创 HDOJ 2030 汉字统计
Problem Description 统计给定文本文件中汉字的个数。Input 输入文件首先包含一个整数n,表示测试实例的个数,然后是n段文本。Output 对于每一段文本,输出其中的汉字的个数,每个测试实例的输出占一行。[Hint:]从汉字机内码的特点考虑~Sample Input 2 WaHaHa! WaHaHa! 今年过节不说话要说只说普通话WaHaHa! WaHaHa! 马上就
2015-10-26 18:55:18 1698
原创 HDOJ 1312 (POJ 1979) Red and Black
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 tile. From a tile, he can move to one of four adjacen
2015-10-26 18:51:33 1709
原创 POJ 1306 Combinations
DescriptionComputing the exact number of ways that N things can be taken M at a time can be a great challenge when N and/or M become very large. Challenges are the stuff of contests. Therefore, you are
2015-10-26 18:24:47 1778
原创 POJ 1503 Integer Inquiry 简单大数相加
DescriptionOne of the first users of BIT’s new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and he explored taking various sums of those numbers. This
2015-10-24 13:59:53 1678
原创 POJ 1936 All in All
DescriptionYou have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. Because of pending patent issues we will n
2015-10-23 18:42:36 1627
原创 POJ 2390 Bank Interest
Problem Description Farmer John made a profit last year! He would like to invest it well but wonders how much money he will make. He knows the interest rate R (an integer between 0 and 20) that is com
2015-10-23 18:20:54 1825
原创 UVa 10082 WERTYU
Problem DescriptionA common typing error is to place the hands on the keyboard one row to the right of the correct position. So “Q” is typed as “W” and “J” is typed as “K” and so on. You are to decode
2015-10-23 16:13:27 2546
原创 POJ 2262 Goldbach's Conjecture
Problem Description In 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which he made the following conjecture: Every even number greater than 4 can be
2015-10-23 15:31:21 1663
原创 HDOJ 2005 第几天?
Problem Description 给定一个日期,输出这个日期是该年的第几天。Input 输入数据有多组,每组占一行,数据格式为YYYY/MM/DD组成,具体参见sample input ,另外,可以向你确保所有的输入数据是合法的。Output 对于每组输入数据,输出一行,表示该日期是该年的第几天。Sample Input 1985/1/20 2006/3/12Sample Outpu
2015-10-22 17:12:48 1674
原创 HDOJ 1064 Financial Management
Problem Description Larry graduated this year and finally has a job. He’s making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to grab hold of his financial p
2015-10-22 16:34:09 1452
原创 HDOJ 2009 求数列的和
Problem Description 数列的定义如下: 数列的第一项为n,以后各项为前一项的平方根,求数列的前m项的和。Input 输入数据有多组,每组占一行,由两个整数n(n<10000)和m(m<1000)组成,n和m的含义如前所述。Output 对于每组输入数据,输出该数列的和,每个测试实例占一行,要求精度保留2位小数。Sample Input 81 4 2 2Sample Ou
2015-10-22 16:14:59 1477
原创 HDOJ 2008 数值统计
Problem Description 统计给定的n个数中,负数、零和正数的个数。Input 输入数据有多组,每组占一行,每行的第一个数是整数n(n<100),表示需要统计的数值的个数,然后是n个实数;如果n=0,则表示输入结束,该行不做处理。Output 对于每组输入数据,输出一行a,b和c,分别表示给定的数据中负数、零和正数的个数。Sample Input 6 0 1 2 3 -1 0
2015-10-22 16:14:14 1557
原创 HDOJ 2007 平方和与立方和
Problem Description 给定一段连续的整数,求出他们中所有偶数的平方和以及所有奇数的立方和。Input 输入数据包含多组测试实例,每组测试实例包含一行,由两个整数m和n组成。Output 对于每组输入数据,输出一行,应包括两个整数x和y,分别表示该段连续的整数中所有偶数的平方和以及所有奇数的立方和。 你可以认为32位整数足以保存结果。Sample Input 1 3 2
2015-10-22 16:13:28 1484
原创 HDOJ 2006 求奇数的乘积
Problem Description 给你n个整数,求他们中所有奇数的乘积。Input 输入数据包含多个测试实例,每个测试实例占一行,每行的第一个数为n,表示本组数据一共有n个,接着是n个整数,你可以假设每组数据必定至少存在一个奇数。Output 输出每组数中的所有奇数的乘积,对于测试实例,输出一行。Sample Input 3 1 2 3 4 2 3 4 5Sample Output
2015-10-22 16:12:34 1614
原创 HDOJ 2004 成绩转换
Problem Description 输入一个百分制的成绩t,将其转换成对应的等级,具体转换规则如下: 90~100为A; 80~89为B; 70~79为C; 60~69为D; 0~59为E;Input 输入数据有多组,每组占一行,由一个整数组成。Output 对于每组输入数据,输出一行。如果输入数据不在0~100范围内,请输出一行:“Score is error!”。Sample
2015-10-22 16:11:46 1485
原创 HDOJ 2003 求绝对值
Problem Description 求实数的绝对值。Input 输入数据有多组,每组占一行,每行包含一个实数。Output 对于每组输入数据,输出它的绝对值,要求每组数据输出一行,结果保留两位小数。Sample Input 123 -234.00Sample Output 123.00 234.00import java.util.*;class Main{ public s
2015-10-22 16:10:51 1542
原创 HDOJ 2002 计算球体积
Problem Description 根据输入的半径值,计算球的体积。Input 输入数据有多组,每组占一行,每行包括一个实数,表示球的半径。Output 输出对应的球的体积,对于每组输入数据,输出一行,计算结果保留三位小数。Sample Input 1 1.5Sample Output 4.189 14.137HintPI 3.1415927import java.util.*;
2015-10-22 16:10:00 1768
原创 HDOJ 2001 计算两点间的距离
Problem Description 输入两点坐标(X1,Y1),(X2,Y2),计算并输出两点间的距离。Input 输入数据有多组,每组占一行,由4个实数组成,分别表示x1,y1,x2,y2,数据之间用空格隔开。Output 对于每组输入数据,输出一行,结果保留两位小数。Sample Input 0 0 0 1 0 1 1 0Sample Output 1.00 1.41impor
2015-10-22 16:08:53 3609 8
原创 HDOJ 1096 A+B for Input-Output Practice (VIII)
Problem Description Your task is to calculate the sum of some integers.Input Input contains an integer N in the first line, and then N lines follow. Each line starts with a integer M, and then M inte
2015-10-22 16:07:34 1641
原创 HDOJ 1095 A+B for Input-Output Practice (VII)
Problem Description Your task is to Calculate a + b.Input The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line. Output For each pair o
2015-10-22 16:06:42 1643
原创 HDOJ 1094 A+B for Input-Output Practice (VI)
Problem Description Your task is to calculate the sum of some integers.Input Input contains multiple test cases, and one case one line. Each case starts with an integer N, and then N integers follow
2015-10-22 16:05:43 1575
原创 HDOJ 1093 A+B for Input-Output Practice (V)
Problem Description Your task is to calculate the sum of some integers.Input Input contains an integer N in the first line, and then N lines follow. Each line starts with a integer M, and then M inte
2015-10-22 16:03:50 1693
原创 HDOJ 1092 A+B for Input-Output Practice (IV)
Problem Description Your task is to Calculate the sum of some integers.Input Input contains multiple test cases. Each test case contains a integer N, and then N integers follow in the same line. A te
2015-10-22 16:02:56 1748
原创 HDOJ 1091 A+B for Input-Output Practice (III)
Problem Description Your task is to Calculate a + b.Input Input contains multiple test cases. Each test case contains a pair of integers a and b, one pair of integers per line. A test case containing
2015-10-22 16:01:58 1592
原创 HDOJ 1090 A+B for Input-Output Practice (II)
Problem Description Your task is to Calculate a + b.Input Input contains an integer N in the first line, and then N lines follow. Each line consists of a pair of integers a and b, separated by a spac
2015-10-22 16:01:02 1937
原创 HDOJ 1089 A+B for Input-Output Practice (I)
Problem Description Your task is to Calculate a + b. Too easy?! Of course! I specially designed the problem for acm beginners. You must have found that some problems have the same titles with this
2015-10-22 15:59:54 1797
原创 HDOJ 1064Financial Management
Problem Description Larry graduated this year and finally has a job. He’s making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to grab hold of his financial p
2015-10-22 15:58:51 1492
原创 HDOJ 1001Sum Problem
Problem Description Hey, welcome to HDOJ(Hangzhou Dianzi University Online Judge).In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + … + n.Input The input will consist of a series of int
2015-10-22 15:56:06 1546
原创 HDOJ 1000 A + B Problem
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 513689 Accepted Submission(s): 162876Problem Description Calculate A + B.Input Each line w
2015-10-22 15:54:39 1432
程序猿情人节必备,情人节网站源码
2021-02-06
windows运行go项目完整教程.zip_win10怎么解压zip文件
2021-01-18
简单实用个人简介说明求职简历单页HTML5响应式网页模板.rar
2020-05-28
Redis-x64-3.2.100.msi for windows 64位
2017-03-02
停用当前管理员,新建管理用户,DOS命令
2015-11-03
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人