自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Hdu 5777多米诺[贪心]

题目连接http://acm.hust.edu.cn/vjudge/problem/440428Description小白在玩一个游戏。桌子上有n张多米诺骨牌排成一列。它有k次机会,每次可以选一个还没有倒的骨牌,向左或者向右推倒。每个骨 牌倒下的时候,若碰到了未倒下的骨牌,可以把它推倒。小白现在可以随意设置骨牌的高度,但是骨牌高度为整数,且至少为1,并且 小白希望在能够推倒所有骨牌的前提下,使所

2016-07-31 20:47:37 340

原创 Hdu5776 字串的和[鸽巢原理]

题目连接http://acm.hust.edu.cn/vjudge/problem/440424DescriptionGiven a sequence, you’re asked whether there exists a consecutive subsequence whose sum is divisible by m. output YES, otherwise output NO Inp

2016-07-31 19:11:16 237

原创 Uva400 [vector与字符串]

题目连接http://acm.hust.edu.cn/vjudge/problem/19295Sample Input19 Mr._French Jody Buffy Sissy Keith Danny Lori Chris Shirley Marsha Jan Cindy Carol Mike Greg Peter Bobby Alice RubenSampl

2016-07-31 15:12:53 386

原创 Cf Edu 15 C 城市与信号塔[二分]

题目连接http://codeforces.com/contest/702/problem/CDescriptionYou are given n points on the straight line — the positions (x-coordinates) of the cities and m points on the same line — the positions (x-coor

2016-07-31 00:32:56 748

原创 Uva136 丑数[优先队列]

题目连接http://acm.hust.edu.cn/vjudge/problem/19437题意找出第1500个素因子只能有2或3或5的数。题解懵逼了吧,并不是素因子筛,用2,3,5去筛并不能得到满足丑数要求的数,例如14就筛不掉。优先队列每次取一个最小的数x,2x,3x,5x,都是丑数,但是每次要判断是否有重数(set),取1500,每次都是取出最小的数,取1500次之后就是第1500个数。代码

2016-07-30 22:48:41 853

原创 Uva540 队列与map

题目连接http://acm.hust.edu.cn/vjudge/problem/19518Sample Input2 3 101 102 103 3 201 202 203 ENQUEUE 101 ENQUEUE 201 ENQUEUE 102 ENQUEUE 202 ENQUEUE 103 ENQUEUE 203 DEQUEUE DEQUEUE DEQUEUE DEQU

2016-07-30 20:16:03 292

原创 CF Edu 15 B 求和二的幂次

题目连接http://codeforces.com/contest/702/problem/BDescriptionYou are given n integers a1, a2, …, an. Find the number of pairs of indexes i, j (i < j) that ai + aj is a power of 2 (i. e. some integer x exi

2016-07-30 11:28:29 826

原创 Uva156 map容器的使用 sortvecor And map.count

题目连接http://acm.hust.edu.cn/vjudge/problem/297728Sample Inputladder came tape soon leader acme RIDE lone Dreis peat ScAlE orb eye Rides dealer NotE derail LaCeS drIed noel dire Disk mace Rob drie

2016-07-30 09:57:13 267

原创 Uva10815 set容器的使用 stringstream ss

题目连接:http://acm.hust.edu.cn/vjudge/problem/18649Sample InputAdventures in Disneyland Two blondes were going to Disneyland when they came to a fork in the road. The sign read: “Disneyland Left.” So

2016-07-29 18:23:56 910

空空如也

空空如也

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

TA关注的人

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