自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

小I的博客

尽管走下去,不必逗留着,去采鲜花来保存,因为在这一路上,花自然会继续开放。

  • 博客(36)
  • 收藏
  • 关注

原创 HDOJ 2095-find your present (2)

In the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now putting on the desk, and only one of them will be yours.Each present has a card number on it, and your present's card number

2015-12-29 17:56:59 260

原创 HDOJ 1049-Climbing Worm【数学】

An inch worm is at the bottom of a well n inches deep. It has enough energy to climb u inches every minute, but then has to rest a minute before climbing again. During the rest, it slips down d inches. The process of climbing and resting then repeats. How

2015-12-29 17:15:27 603

原创 HDOJ 1008-Elevator【数学】

The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator up one floor, and 4 seconds to

2015-12-29 16:58:34 313

原创 HDOJ 5532-Almost Sorted Array【模拟】

We are all familiar with sorting algorithms: quick sort, merge sort, heap sort, insertion sort, selection sort, bubble sort, etc. But sometimes it is an overkill to use these algorithms for an almost sorted array.We say an array is sorted if its elements

2015-12-29 16:45:53 395

原创 HDOJ 2512-一卡通大冒险【组合数学】

因为长期钻研算法, 无暇顾及个人问题,BUAA ACM/ICPC 训练小组的帅哥们大部分都是单身。某天,他们在机房商量一个绝妙的计划"一卡通大冒险"。这个计划是由wf最先提出来的,计划的内容是,把自己的联系方式写在校园一卡通的背面,然后故意将自己的卡"遗失"在某处(如水房,TD,食堂,主M。。。。)他们希望能有MM看到他们遗失卡,能主动跟他们联系,这样就有机会请MM吃饭了。他们决定将自己的一卡通夹在基本相同的书里,然后再将书遗失到校园的各个角落。正当大家为这个绝妙的计划叫好时,大家想到一个问题。很明显,如果

2015-12-29 16:22:07 651

原创 HDOJ 5500-Reorder the Books

dxy has a collection of a series of books called "The Stories of SDOI",There are n(n≤19) books in this series.Every book has a number from 1 to n.dxy puts these books in a book stack with the order of their numbers increasing from top to bottom. dxy take

2015-12-28 14:51:10 287

原创 HDOJ 1302-The Snail

A snail is at the bottom of a 6-foot well and wants to climb to the top. The snail can climb 3 feet while the sun is up, but slides down 1 foot at night while sleeping. The snail has a fatigue factor of 10%, which means that on each successive day the snai

2015-12-28 13:59:55 358

原创 LightOJ 1297 - Largest Box【二分】

In the following figure you can see a rectangular card. The width of the card is W and length of the card is L and thickness is zero. Four (x*x) squares are cut from the four corners of the card shown by the black dotted lines. Then the card is folded alon

2015-12-28 13:44:56 531

原创 第六届福建省大学生程序设计竞赛 Problem J RunningMan【数学】

Problem J RunningMan Accept: 123    Submit: 551Time Limit: 1000 mSec    Memory Limit : 32768 KB Problem DescriptionZB loves watching RunningMan! There's a game in RunningMan called 100 vs 10...

2015-12-27 16:26:56 1538

原创 第六届福建省大学生程序设计竞赛 Problem C Knapsack problem【背包问题】

Problem C Knapsack problem Accept: 81    Submit: 434Time Limit: 3000 mSec    Memory Limit : 32768 KB Problem DescriptionGiven a set of n items, each with a weight w[i] and a value v[i], dete...

2015-12-27 16:21:25 1315 8

原创 第六届福建省大学生程序设计竞赛 Problem B Common Tangents【几何】

Problem B Common Tangents Accept: 183    Submit: 587Time Limit: 1000 mSec    Memory Limit : 32768 KB Problem DescriptionTwo different circles can have at most four common tangents.The pict...

2015-12-27 16:17:27 705

原创 第六届福建省大学生程序设计竞赛 Problem A Super Mobile Charger【模拟】

Problem A Super Mobile Charger Accept: 209    Submit: 391Time Limit: 1000 mSec    Memory Limit : 32768 KB Problem DescriptionWhile HIT ACM Group finished their contest in Shanghai and is hea...

2015-12-27 16:11:30 1109

原创 ZOJ Problem Set - 2104 Let the Balloon Rise

Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will count the balloons of each color and find the result.This

2015-12-24 13:53:19 376

原创 ZOJ Problem Set - 2554 Brownie Points

Stan and Ollie play the game of Odd Brownie Points. Some brownie points are located in the plane, at integer coordinates. Stan plays first and places a vertical line in the plane. The line must go through a brownie point and may cross many (with the same x

2015-12-23 13:15:43 345

原创 ZOJ Problem Set - 2186 Keep on Truckin'【模拟】

Boudreaux and Thibodeaux are on the road again . . ."Boudreaux, we have to get this shipment of mudbugs to Baton Rouge by tonight!""Don't worry, Thibodeaux, I already checked ahead. There are three underpasses and our 18-wheeler will fit through all of t

2015-12-23 13:02:40 644

原创 数据结构上机实验-希尔排序,快速排序,堆排序

数据结构上机实验-希尔排序,快速排序,堆排序

2015-12-20 16:28:05 2558 1

原创 ZZULIOJ 1799: wrz的压岁钱【数学】

马上要过年了,电子信息wrz要去亲戚家拿压岁钱。他的亲戚有三家,他有一辆谷鸽牌电动车,电量只能支持从自己家骑到任意一家亲戚家,然后电动车就会没电了,电动车会放在该亲戚家充电。剩下的两家亲戚由电子信息wrz步行过去,之后再回来骑充满电的谷鸽牌电动车回家。但是电子信息wrz比较懒,不喜欢走太多路,你能帮他算出最少要走多少路程吗?

2015-12-13 16:05:39 499

原创 1801: xue姐的小动物【排序】

xue姐喜欢动物,于是养了好多动物,动物的食物成了xue姐的最大难题。xue姐共有n个动物,每个动物有一定的饥饿值,于是xue姐买了n个食物。每个食物有一定的能量值,每个动物吃一个食物,该食物的能量值大于等于该动物的饥饿值时才算吃饱(每个食物只能一只动物吃,不能分开)。问xue姐的动物们能否全部都吃饱?

2015-12-13 13:22:11 656

原创 ZZULIOJ 1798: 戴姆勒的求助【数学】

戴姆勒最近比较喜欢平方数,自称掌握所有关于平方数的题。灿灿听到后就不高兴了,立马要考考他。聪明的灿灿要用立方数来难倒他。他给戴姆

2015-12-13 12:17:15 684

原创 1800: 少水群多刷题

少水群多刷题

2015-12-13 11:17:33 1099

原创 数据结构--上机实验实验要求:二叉排序树【拓展】

编写算法实现二叉排序树的创建,插入与删除操作。(创建时是根据给定数据的无序序列,按照输入顺序创建)

2015-12-12 20:12:56 3596 1

原创 Vijos P1001谁拿了最多奖学金

某校的惯例是在每学期的期末考试之后发放奖学金。发放的奖学金共有五种,获取的条件各自不同:1) 院士奖学金,每人8000元,期末平均成绩高于80分(>80),并且在本学期内发表1篇或1篇以上论文的学生均可获得;2) 五四奖学金,每人4000元,期末平均成绩高于85分(>85),并且班级评议成绩高于80分(>80)的学生均可获得;3) 成绩优秀奖,每人2000元,期末平均成绩高于90分(>90)的学生均可获得;4) 西部奖学金,每人1000元,期末平均成绩高于85分(>85)的西部省份学生均可获得;5

2015-12-12 12:43:09 452

原创 LightOJ 1275 - Internet Service Providers

A group of N Internet Service Provider companies (ISPs) use a private communication channel that has a maximum capacity of C traffic units per second. Each company transfers T traffic units per second through the channel and gets a profit that is directly

2015-12-10 11:07:41 413

原创 LightOJ 1294 - Positive Negative Sign【数学】

Given two integers: n and m and n is divisible by 2m, you have to write down the first n natural numbers in the following form. At first take first m integers and make their sign negative, then take next m integers and make their sign positive, the next m

2015-12-10 10:53:11 348

原创 数据结构上机实验-二叉排序树的创建

二叉排序树 二叉排序树(Binary Sort Tree)又称二叉查找树(Binary Search Tree),亦称二叉搜索树。二叉排序树或者是一棵空树,或者是具有下列性质的二叉树:(1)若左子树不空,则左子树上所有结点的值均小于它的根结点的值;(2)若右子树不空,则右子树上所有结点的值均大于它的根结点的值;(3)左、右子树也分别为二叉排序树;(4)没有键值相等的节点。

2015-12-06 19:12:42 1243

原创 HDOJ 5533-Hidden String

The sky was brushed clean by the wind and the stars were cold in a black sky. What a wonderful night. You observed that, sometimes the stars can form a regular polygon in the sky if we connect them properly. You want to record these moments by your smart c

2015-12-06 14:16:58 345

原创 HDOJ 5311-Hidden String【深搜】

Today is the 1st anniversary of BestCoder. Soda, the contest manager, gets a string s of length n. He wants to find three nonoverlapping substrings s[l1..r1], s[l2..r2], s[l3..r3] that:1. 1≤l1≤r1<l2≤r2<l3≤r3≤n2. The concatenation of s[l1..r1], s[l2..r2

2015-12-06 14:09:18 388

原创 LightOJ 1043 - Triangle Partitioning

Input starts with an integer T (≤ 25), denoting the number of test cases.Each case begins with four real numbers denoting AB, AC, BC and the ratio of ADE and BDEC (ADE / BDEC). You can safely assume that the given triangle is a valid triangle with positi

2015-12-06 14:02:36 439

原创 LightOJ 1214 - Large Division【同余定理】

Given two integers, a and b, you should check whether a is divisible by b or not. We know that an integer a is divisible by an integer b if and only if there exists an integer c such that a = b * c.

2015-12-06 12:16:57 283

原创 POJ - 1488 - TEX Quotes (字符串!)

TEX is a typesetting language developed by Donald Knuth. It takes source text together with a few typesetting instructions and produces, one hopes, a beautiful document. Beautiful documents use double-left-quote and double-right-quote to delimit quotations

2015-12-06 10:18:57 281

原创 LightOJ 1148 - Mad Counting【数学】

Mob was hijacked by the mayor of the Town "TruthTown". Mayor wants Mob to count the total population of the town. Now the naive approach to this problem will be counting people one by one. But as we all know Mob is a bit lazy, so he is finding some other a

2015-12-06 09:39:10 284

原创 LightOJ 1116 - Ekka Dokka【简单数学】

Ekka and his friend Dokka decided to buy a cake. They both love cakes and that's why they want to share the cake after buying it. As the name suggested that Ekka is very fond of odd numbers and Dokka is very fond of even numbers, they want to divide the ca

2015-12-06 01:04:29 325

原创 Vijos P1034家族【基础并查集】

若某个家族人员过于庞大,要判断两个是否是亲戚,确实还很不容易,现在给出某个亲戚关系图,求任意给出的两个人是否具有亲戚关系。规定:x和y是亲戚,y和z是亲戚,那么x和z也是亲戚。如果x,y是亲戚,那么x的亲戚都是y的亲戚,y的亲戚也都是x的亲戚。

2015-12-04 18:01:30 401

原创 HDOJ 2674-N!Again【数论】

WhereIsHeroFrom: Zty, what are you doing ?Zty: I want to calculate N!......WhereIsHeroFrom: So easy! How big N is ?Zty: 1 <=N <=100000000000000000000000000000

2015-12-04 13:42:05 334

原创 LightOJ 1078 - Integer Divisibility【同余】

If an integer is not divisible by 2 or 5, some multiple of that number in decimal notation is a sequence of only a digit. Now you are given the number and the only allowable digit, you should report the number of digits of such multiple.For example you h

2015-12-04 13:26:59 347

原创 LightOJ-1008 Fibsieve`s Fantabulous Birthday

Fibsieve had a fantabulous (yes, it's an actual word) birthday party this year. He had so many gifts that he was actually thinking of not having a party next year.Among these gifts there was an N x N glass chessboard that had a light in each of its cells.

2015-12-03 13:33:40 288

空空如也

空空如也

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

TA关注的人

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