自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 HDU2046 骨牌铺方格

Problem Description 在2×n的一个长方形方格中,用一个1× 2的骨牌铺满方格,输入n ,输出铺放方案的总数. 例如n=3时,为2× 3方格,骨牌的铺放方案有三种,如下图: Input 输入数据由多行组成,每行包含一个整数n,表示该测试实例的长方形方格的规格是2×n (0< n<=50)。 Output 对于每个测试实例,请输出铺放方案的总数,每个实例的输出占一行。

2017-02-03 19:05:29 205

原创 HDU2045 不容易系列之(3)—— LELE的RPG难题

Problem Description 人称“AC女之杀手”的超级偶像LELE最近忽然玩起了深沉,这可急坏了众多“Cole”(LELE的粉丝,即”可乐”),经过多方打探,某资深Cole终于知道了原因,原来,LELE最近研究起了著名的RPG难题:有排成一行的n个方格,用红(Red)、粉(Pink)、绿(Green)三色涂每个格子,每格涂一色,要求任何相邻的方格不能同色,且首尾两格也不同色.求全部的

2017-02-03 18:39:17 194

原创 HDU2006 求奇数的乘积

Problem Description 给你n个整数,求他们中所有奇数的乘积。 Input 输入数据包含多个测试实例,每个测试实例占一行,每行的第一个数为n,表示本组数据一共有n个,接着是n个整数,你可以假设每组数据必定至少存在一个奇数。 Output 输出每组数中的所有奇数的乘积,对于测试实例,输出一行。 Sample Input 3 1 2 3 4 2 3 4 5 Sample

2017-02-02 20:11:47 192

原创 HDU2005 第几天?

Problem Description 给定一个日期,输出这个日期是该年的第几天 Input 输入数据有多组,每组占一行,数据格式为YYYY/MM/DD组成,具体参见sample input ,另外,可以向你确保所有的输入数据是合法的。 Output 对于每组输入数据,输出一行,表示该日期是该年的第几天。 Sample Input 1985/1/20 2006/3/12 Sampl

2017-02-02 20:10:16 220

原创 HDU2004 成绩转换

Problem Description 输入一个百分制的成绩t,将其转换成对应的等级,具体转换规则如下: 90~100为A; 80~89为B; 70~79为C; 60~69为D; 0~59为E; Input Output Sample Input Sample Output Author 代码

2017-02-02 20:03:45 182

原创 HDU2003 求绝对值

Problem Description 求实数的绝对值。 Input 输入数据有多组,每组占一行,每行包含一个实数。 Output 对于每组输入数据,输出它的绝对值,要求每组数据输出一行,结果保留两位小数。 Sample Input 123 -234.00 Sample Output 123.00 234.00 Author lcy 代码 #include<iostre

2017-02-02 20:02:21 126

原创 HDU2002 计算球体积

Problem Description 根据输入的半径值,计算球的体积。 Input 输入数据有多组,每组占一行,每行包括一个实数,表示球的半径。 Output 输出对应的球的体积,对于每组输入数据,输出一行,计算结果保留三位小数。 Sample Input 1 1.5 Sample Output 4.189 14.137Hint #define PI 3.1415927

2017-02-02 20:00:53 199

原创 HDU2001 计算两点间的距离

Problem Description 输入两点坐标(X1,Y1),(X2,Y2),计算并输出两点间的距离。 Input 输入数据有多组,每组占一行,由4个实数组成,分别表示x1,y1,x2,y2,数据之间用空格隔开。 Output 对于每组输入数据,输出一行,结果保留两位小数。 Sample Input 0 0 0 1 0 1 1 0 Sample Output 1.00

2017-02-02 19:58:50 149

原创 HDU2000 ASCII码排序

Problem Description 输入三个字符后,按各字符的ASCII码从小到大的顺序输出这三个字符。 Input 输入数据有多组,每组占一行,有三个字符组成,之间无空格。 Output 对于每组输入数据,输出一行,字符中间用一个空格分开。 Sample Input qwe asd zxc Sample Output e q w a d s c x z Author

2017-02-02 19:55:52 312

原创 HDU1998 奇数阶魔方

Problem Description 一个 n 阶方阵的元素是1,2,…,n^2,它的每行,每列和2条对角线上元素的和相等,这样 的方阵叫魔方。n为奇数时我们有1种构造方法,叫做“右上方” ,例如下面给出n=3,5,7时 的魔方. 3 8 1 6 3 5 7 4 9 2 5 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 2

2017-02-02 19:54:28 344

原创 HDU1096 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 i

2017-02-02 16:58:29 199

原创 HDU1095 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 p

2017-02-02 16:57:06 253

原创 HDU1094 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 foll

2017-02-02 16:55:16 179

原创 HDU1093 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 i

2017-02-02 16:53:00 194

原创 HDU1092 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

2017-02-02 00:26:50 180

原创 HDU1091 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 contain

2017-02-02 00:24:46 204

原创 HDU1090 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 s

2017-02-02 00:22:38 292

原创 HDU1089 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

2017-02-02 00:20:01 264

原创 HDU1002 A + B Problem II

Problem Description I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. Input The first line of the input contains an integer T(1<=T<=20) wh

2017-02-02 00:16:56 279

原创 HDU1001 Sum 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

2017-02-02 00:11:55 325

原创 HDU1000 A + B Problem

Problem Description Calculate A + B. Input Each line will contain two integers A and B. Process to end of file. Output For each case, output A + B in one line. Sample Input 1 1 Sample Output 2 Aut

2017-02-02 00:07:55 178

原创 高精度加法

高精度加法C语言版#include<stdio.h> #include<string.h> void high_accuracy(char *a,char *b){ int m,n,i=0,p=0; char c[1001]; m=strlen(a)-1; n=strlen(b)-1; for(i=0;m>=0||n>=0;i++,m--,n--){

2017-01-19 15:16:50 192

原创 第一个C/C++程序

第一个程序 C/C++ C :#include<stdio.h> int main(){ printf("Hello,World!"); return 0; }C Plus :#include<iostream> using namespace std; int main(){ cout<<"Hello,World!"<<endl; return 0; }第一个程序

2017-01-19 14:34:55 179

转载 欢迎使用CSDN-markdown编辑器

欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦: Markdown和扩展Markdown简洁的语法 代码块高亮 图片链接和图片上传 LaTex数学公式 UML序列图和流程图 离线写博客 导入导出Markdown文件 丰富的快捷键 快捷键 加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl

2017-01-19 14:05:29 117

空空如也

空空如也

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

TA关注的人

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