自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

HPU留白的博客

从模仿到超越,我还在路上!仍需努力,砥砺前行!

  • 博客(42)
  • 资源 (3)
  • 收藏
  • 关注

原创 Red and Black

Red and BlackThere 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 adjacent

2017-07-31 23:32:14 236

原创 Uncowed Forces

Kevin Sun has just finished competing in Codeforces Round #334! The round was 120 minutes long and featured five problems with maximum point values of 500, 1000, 1500, 2000, and 2500, respectively. De

2017-07-31 17:56:09 209

原创 Tricky Sum

Tricky SumIn this problem you are to calculate the sum of all integers from 1 to n, but you should take all powers of two with minus in the sum.For example, for n = 4 the sum is equal to  - 1

2017-07-31 17:50:58 199

原创 New Year and Days

New Year and DaysToday is Wednesday, the third day of the week. What's more interesting is that tomorrow is the last day of the year 2015.Limak is a little polar bear. He enjoyed this year a l

2017-07-31 17:47:33 217

原创 Windows Message Queue

H - Windows Message QueueMessage queue is the basic fundamental of windows system. For each process, the system maintains a message queue. If something happens to this process, such as mouse cli

2017-07-31 17:44:01 288

原创 Saving HDU

Saving HDU话说上回讲到海东集团面临内外交困,公司的元老也只剩下XHD夫妇二人了。显然,作为多年拼搏的商人,XHD不会坐以待毙的。   一天,当他正在苦思冥想解困良策的时候,突然想到了自己的传家宝,那是公司成立的时候,父亲作为贺礼送来的一个锦囊,徐父当时交代,不到万不得已的时候,不要打开它。“现在不正是最需要的时候吗?”,一边想,XHD一边找到了这个精心保管的锦囊,打开一看

2017-07-31 17:41:14 196

原创 质数中的质数(质数筛法)

质数中的质数(质数筛法)如果一个质数,在质数列表中的编号也是质数,那么就称之为质数中的质数。例如:3 5分别是排第2和第3的质数,所以他们是质数中的质数。现在给出一个数N,求>=N的最小的质数中的质数是多少(可以考虑用质数筛法来做)。Input输入一个数N(N Output输出>=N的最小的质数中的质数。Sample Input20Sample Output

2017-07-31 17:36:30 454

原创 A - Divisibility

A - DivisibilityFind the number of k-divisible numbers on the segment [a, b]. In other words you need to find the number of such integer values x that a ≤ x ≤ b and x is divisible by k.

2017-07-31 17:33:15 282

原创 H - 欧拉

H - 欧拉新年快到了,“猪头帮协会”准备搞一个聚会,已经知道现有会员N人,把会员从1到N编号,其中会长的号码是N号,凡是和会长是老朋友的,那么该会员的号码肯定和N有大于1的公约数,否则都是新朋友,现在会长想知道究竟有几个新朋友?请你编程序帮会长计算出来。Input第一行是测试数据的组数CN(Case number,1Output对于每一个N,输出一行新朋友的人数,

2017-07-31 17:28:15 252

原创 F - 容斥

F - 容斥Given a number N, you are asked to count the number of integers between A and B inclusive which are relatively prime to N. Two integers are said to be co-prime or relativel

2017-07-31 17:24:48 239

原创 E - 容斥

E - 容斥 Given n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if there are no integers x > 1, y > 0, z

2017-07-31 17:20:42 214

原创 D - 容斥

D - 容斥While skimming his phone directory in 1982, Albert Wilansky, a mathematician of Lehigh University,noticed that the telephone number of his brother-in-law H. Smith had the following pec

2017-07-31 17:18:43 196

原创 A - 抽屉

A - 抽屉 HOHO,终于从Speakless手上赢走了所有的糖果,是Gardon吃糖果时有个特殊的癖好,就是不喜欢将一样的糖果放在一起吃,喜欢先吃一种,下一次吃另一种,这样;可是Gardon不知道是否存在一种吃糖果的顺序使得他能把所有糖果都吃完?请你写个程序帮忙计算一下。 Input第一行有一个整数T,接下来T组数据,每组数据占2行,第一行是一个整数

2017-07-31 17:17:02 211

原创 I - 0和5

I - 0和5小K手中有n张牌,每张牌上有一个一位数的数,这个字数不是0就是5。小K从这些牌在抽出任意张(不能抽0张),排成一行这样就组成了一个数。使得这个数尽可能大,而且可以被90整除。注意:1.这个数没有前导0,2.小K不需要使用所有的牌。Input每个测试数据输入共2行。 第一行给出一个n,表示n张牌。(1第二行给出n个整数a[0],a[1],a[

2017-07-28 13:33:05 238

原创 D - 看病要排队

D - 看病要排队看病要排队这个是地球人都知道的常识。 不过经过细心的0068的观察,他发现了医院里排队还是有讲究的。0068所去的医院有三个医生(汗,这么少)同时看病。而看病的人病情有轻重,所以不能根据简单的先来先服务的原则。所以医院对每种病情规定了10种不同的优先级。级别为10的优先权最高,级别为1的优先权最低。医生在看病时,则会在他的队伍里面选择一个优先权最高的人进行诊治。如

2017-07-28 11:18:13 201

原创 I - Rightmost Digit

I - Rightmost DigitGiven a positive integer N, you should output the most right digit of N^N. InputThe input contains several test cases. The first line of the input is a single integer T

2017-07-28 11:01:05 302

原创 F - What Is Your Grade?

F - What Is Your Grade?“Point, point, life of student!” This is a ballad(歌谣)well known in colleges, and you must care about your score in this exam too. How many points can you get? Now, I tol

2017-07-27 22:49:44 281

原创 G - Bear and Three Balls

G - Bear and Three BallsLimak is a little polar bear. He has n balls, the i-th ball has sizeti.Limak wants to give one ball to each of his three friends. Giving gifts isn't easy — there are tw

2017-07-27 22:46:06 254

原创 C - 前m大的数

C - 前m大的数还记得Gardon给小希布置的那个作业么?(上次比赛的1005)其实小希已经找回了原来的那张数表,现在她想确认一下她的答案是否正确,但是整个的答案是很庞大的表,小希只想让你把答案中最大的M个数告诉她就可以了。 给定一个包含N(NInput输入可能包含多组数据,其中每组数据包括两行: 第一行两个数N和M, 第二行N个数,表示该序列。 Ou

2017-07-27 22:40:30 367

原创 D - The Frog's Games

D - The Frog's GamesThe annual Games in frogs' kingdom started again. The most famous game is the Ironfrog Triathlon. One test in the Ironfrog Triathlon is jumping. This project requires the

2017-07-27 22:35:40 253

原创 B - Cake

B - Cake一次生日Party可能有p人或者q人参加,现准备有一个大蛋糕.问最少要将蛋糕切成多少块(每块大小不一定相等),才能使p人或者q人出席的任何一种情况,都能平均将蛋糕分食. Input每行有两个数p和q. Output输出最少要将蛋糕切成多少块. Sample Input2 3Sample Output4

2017-07-27 22:32:46 328

原创 H - the Sum of Cube

H - the Sum of CubeA range is given, the begin and the end are both integers. You should sum the cube of all the integers in the range.InputThe first line of the input is T(1 Each case o

2017-07-27 22:22:55 239

原创 C - 又见GCD

C - 又见GCD有三个正整数a,b,c(0Input第一行输入一个n,表示有n组测试数据,接下来的n行,每行输入两个正整数a,b。Output输出对应的c,每组测试数据占一行。Sample Input26 212 4Sample Output48#include #include int gcd(int a,int

2017-07-27 22:19:42 486

原创 B - Pie

B - PieMy 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 of various sizes. F of my friends are coming to my party and

2017-07-27 21:55:19 270

原创 C - Trailing Zeroes (III)

You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = 1*2*...*N. For example, 5! = 120, 120 contains one zero on the t

2017-07-27 14:16:30 206

原创 利息计算

A - 利息计算Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1994Description为自行解决学费,chx勤工俭学收入10000元以1年定期存入银行,年利率为3.7% 。利率 按年计算,表

2017-07-26 18:21:58 518

原创 所爱图书

I - 所爱图书Time Limit:1000MS     Memory Limit:131072KB     64bit IO Format:%lld & %lluSubmit Status Practice LOCAL 1052Description你知道ISBN号码吗?国际标准书号(International Standard Book Numbe

2017-07-26 18:20:32 383

原创 N!again

F - N!AgainTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 2674DescriptionWhereIsHeroFrom:             Zty, what are you doin

2017-07-26 18:17:29 304

原创 美素数

J - 美素数Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 4548Description  小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识。  

2017-07-26 18:15:09 416

原创 统计元音

E - 统计元音Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 2027Description统计每个元音字母在字符串中出现的次数。Input输入数据首先包括一个整数n,表示测试

2017-07-26 18:12:51 372

原创 Picture

B - PictureTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 2052DescriptionGive you the width and height of the rectangle,da

2017-07-26 18:10:00 266

原创 进制转换

G - 进制转换Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 2031Description输入一个十进制数N,将它转换成R进制数输出。Input输入数据包含多个测试实例,

2017-07-26 18:08:03 261

原创 阶乘之和

阶乘之和时间限制:3000 ms  |  内存限制:65535 KB难度:3描述给你一个非负数整数n,判断n是不是一些数(这些数不允许重复使用,且为正数)的阶乘之和,如9=1!+2!+3!,如果是,则输出Yes,否则输出No;输入第一行有一个整数0每组测试数据有一个正整数n输出如果符合条件,输出Yes,否则输出No;样例输入2910样例输出YesNo上传

2017-07-26 18:04:58 413

原创 背包问题

背包问题时间限制:3000 ms  |  内存限制:65535 KB难度:3描述现在有很多物品(它们是可以分割的),我们知道它们每个物品的单位重量的价值v和重量w(1<=v,w<=10);如果给你一个背包它能容纳的重量为m(10<=m<=20),你所要做的就是把物品装到背包里,使背包里的物品的价值总和最大。输入第一行输入一个正整数n(1随后有n测试数

2017-07-26 18:03:21 250

原创 会场安排问题

会场安排问题时间限制:3000 ms  |  内存限制:65535 KB难度:4描述学校的小礼堂每天都会有许多活动,有时间这些活动的计划时间会发生冲突,需要选择出一些活动进行举办。小刘的工作就是安排学校小礼堂的活动,每个时间最多安排一个活动。现在小刘有一些活动计划的时间表,他想尽可能的安排更多的活动,请问他该如何安排。输入第一行是一个整型数m(m每组

2017-07-26 18:01:21 289

原创 喷水装置(一)

喷水装置(一)时间限制:3000 ms  |  内存限制:65535 KB难度:3描述现有一块草坪,长为20米,宽为2米,要在横中心线上放置半径为Ri的喷水装置,每个喷水装置的效果都会让以它为中心的半径为实数Ri(0<Ri<15)的圆被湿润,这有充足的喷水装置i(1<i<600)个,并且一定能把草坪全部湿润,你要做的是:选择尽量少的喷水装置,把整个草坪的全部湿润。

2017-07-26 17:57:51 214

原创 A - ACboy needs your help again!

栈和队列问题ACboy was kidnapped!! he miss his mother very much and is very scare now.You can't image how dark the room he was put into is, so poor :(.  As a smart ACMer, you want to get ACboy out of t

2017-07-25 20:17:26 200

原创 统计同成绩学生人数

读入N名学生的成绩,将获得某一给定分数的学生人数输出。 Input测试输入包含若干测试用例,每个测试用例的格式为 第1行:N 第2行:N名学生的成绩,相邻两数字用一个空格间隔。 第3行:给定分数 当读到N=0时输入结束。其中N不超过1000,成绩分数为(包含)0到100之间的一个整数。 Output对每个测试用例,将获得给定分数的学生人数输出。 

2017-07-23 21:23:23 328

原创 excel 排序

Excel可以对一组纪录按任意指定列排序。现请你编写程序实现类似功能。Input测试输入包含若干测试用例。每个测试用例的第1行包含两个整数 N (行,每行包含一条学生纪录。每条学生纪录由学号(6位数字,同组测试中没有重复的学号)、姓名(不超过8位且不包含空格的字符串)、成绩(闭区间[0, 100]内的整数)组成,每个项目间用1个空格隔开。当读到 N=0 时,全部输入结束,相应的结果不要

2017-07-23 21:17:48 284

原创 开门人关门人

每天第一个到机房的人要把门打开,最后一个离开的人要把门关好。现有一堆杂乱的机房签 到、签离记录,请根据记录找出当天开门和关门的人。 Input测试输入的第一行给出记录的总天数N ( > 0 )。下面列出了N天的记录。 每天的记录在第一行给出记录的条目数M ( > 0 ),下面是M行,每行的格式为 证件号码 签到时间 签离时间 其中时间按“小时:分钟:秒钟”(各占

2017-07-23 21:12:01 235

计算机基础考研408模拟题

适合考计算机408或相关科目的考研党使用,文件包含8套408模拟卷,并附有详细答案,各种考点一应俱全,质量比较高。

2020-07-28

AddrBook1.rar

基于Android的通讯录简单设计,功能包括增加、删除、更新、根据姓名或电话号码查找联系人、打电话、发信息等功能

2020-04-12

空空如也

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

TA关注的人

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