自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

未闻花开

君子不器

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

原创 数据结构概论

数据与数据结构数据是信息的载体,是描述客观事物的数、字符、以及其他能够记录承载信息的并且能够被计算机读入、识别以及处理的符号集合。为了有效的组织数据,也为了能够更加方便的使用数据我们引入数据结构这一概念:数据结构由某一数据元素的集合和该集合中各个数据相互之间的关系组成。记为: Data_Structure = {Data,Relationship}图1.数据结构示意图数据结构分类一句数据元素之

2016-01-07 19:14:00 590

原创 优先队列(堆)

优先队列简介队列是计算机科学中的一类抽象数据类型。我们都知道普通队列结构具有数据元素“先进先出”的结构特点,也就是先输入的数据元素的优先权大于后输入元素的优先权,最先输入的元素具有最高优先权,此时仅需O(1)的时间复杂度就可以对它进行访问。 但是现实生活中数据元素的优先级往往是多变的,随着应用环境的改变元素之间的优先级关系往往也会随之改变。比如,在多用户环境中,操作系统调度程序必须根据程

2015-12-21 14:12:37 709

原创 Windows实现俄罗斯方块

俄罗斯方块项目实验报告Email: Ludenghui.cs@gmail.com摘要       《俄罗斯方块》(俄语:Тетрис,英语:Tetris),是上世纪80年末期至90年代初期风靡全世界的电脑游戏,是落下型益智游戏的始祖,为苏联首个在美国发布的娱乐软件。该游戏最初是由阿列克谢·帕基特诺夫在苏联设计和编程,于1984年6月6日首次发布,当时帕基特诺夫正在苏联科学院电算中心工作

2018-01-04 15:02:37 2848

转载 最大连续子序列之和

Sicily 1888. Circular Seque最大连续子序列之和

2016-01-18 16:33:36 688

原创 Sicily 1920. Divide The Stones

Time Limit: 2 secs, Memory Limit: 32 MBDescriptionAlice and Bob like game theory very much. They want to practise in a new game. There are N piles of stones. Each pile of stones may have different numb

2016-01-18 00:09:48 633

原创 Sicily 1930. 排序

Time Limit: 1 secs, Memory Limit: 32 MBDescription我们都知道,在排序算法中需要进行多次比较。若比较的两个数Ai, Aj(i// 选择排序#include <iostream>using namespace std;int main(){ int T, N, Temp, gg; cin >> T; while (T--)

2016-01-17 14:37:57 654

原创 Sicily 1931. 卡片游戏

Time Limit: 1 secs, Memory Limit: 32 MBDescription桌上有一叠牌,从第一张牌(即位于顶面的牌)开始从上往下依次编号为1~n。当至少还剩两张牌时进行以下操作:把第一张牌扔掉,然后把新的第一张放到整叠牌的最后。输入n,输出每次扔掉的牌,以及最后剩下的牌。 Input第一行为一个整数t(0#include <iostream>#include <queue

2016-01-17 11:27:39 448

原创 Sicily 4427. Greatest Common Divisors

练习使用pair来使函数返回多个值

2016-01-17 11:09:33 511

原创 Sicily 4868. 数字反转

整型数字翻转

2016-01-17 01:02:28 944

原创 Sicily 13476. 完数问题

Sicily 13476. 完数问题

2016-01-17 00:39:27 449

原创 Sicily 12986. An Odd Sum

Time Limit: 1 secs, Memory Limit: 256 MBDescriptionSome numbers such as 40 can be written as the sum of consecutive integers. For example,40 = 6 + 7 + 8 + 9 + 10.Shiflett and Shultz defined odd-summing

2016-01-16 21:15:53 617

原创 Sicily 4188. 进制转换

Time Limit: 1 secs, Memory Limit: 256 MBDescription输入一个非负的十进制整数,将其转为二进制.Input输入的第一行是一个整数T,表示总共有T组数据.接下来的T行,每行是一组数据,每组数据是一个待转换的十进制整数n(0<=n<2^31).Output对于每个十进制数,输出其对应的二进制数,每个数占一行. 注意输出的二进制数不要有多余的前导0.Samp

2016-01-16 19:17:08 829

原创 Sicily 3836. 计算组合数

Time Limit: 1 secs, Memory Limit: 256 MBDescription从n个不同物品中选出m个的选法总数用组合数C(n, m)来表示. 已知n和m,求C(n, m)的值.Input输入包含多组测试数据.输入的每行是两个整数n和m(0<=m<=n<=10).m和n都为0时表示输入结束.Output输出的每行是一个C(n, m)的值.Sample Input5 2 3

2016-01-16 18:42:11 480

原创 Sicily 2403. Voting

Time Limit: 1 secs, Memory Limit: 256 MBDescriptionA committee clerk is good at recording votes, but not so good at counting and figuring the outcome correctly. As a roll call vote proceeds, the clerk

2016-01-16 00:43:46 450

原创 Sicily 4700. 小明与奶牛

Time Limit: 1 secs, Memory Limit: 256 MBDescription小明是奶牛场的员工,已知奶牛按品种分为3类,分别编号为1,2,3,小明的任务是找出每一类奶牛的最大产奶量。给定一个整数N(1<=N<=10,000)代表奶牛的总数,并且给出每头奶牛的编号(1,..,3)以及产奶量(1,…,1,000,000),找出每类奶牛中最大的产奶量。 Input第一行为T(1

2016-01-14 11:21:36 598

原创 Sicily 2010. H Number

Time Limit: 1 secs, Memory Limit: 256 MBDescriptionHengheng is a math nerd. Today he invents a new kind of numbers so called H number. These numbers satisfy that each digit is either the sum or the dif

2016-01-14 10:21:35 500

原创 Sicily 1198. Substring

Time Limit: 1 secs, Memory Limit: 32 MBDescriptionDr lee cuts a string S into N pieces,s[1],…,s[N]. Now, Dr lee gives you these N sub-strings: s[1],…s[N]. There might be several possibilities that the

2016-01-10 23:18:16 520

原创 Sicily 2005. Lovely Number

Time Limit: 1 secs, Memory Limit: 64 MBDescriptionEvery time after got a solution from kevin, ivan repeats again and again,”Are there any better ones?”. It seems more worse this time. Given a sequence

2016-01-10 21:34:46 728

原创 Sicily 2038. String Reversion

Time Limit: 1 secs, Memory Limit: 256 MBDescriptionGiven a valid identifier in C programs, please write a program to reverse it by respectively reversing two parts separated by ‘_’.InputThe first line

2016-01-09 22:56:24 685

原创 Sicily 1561. PRIME

Time Limit: 1 secs, Memory Limit: 32 MBDescriptionA prime number is a natural number which has exactly two distinct natural number divisors: 1 and itself. The first prime number is 2. Can you write a p

2016-01-09 21:51:48 646

原创 Sicily 1500. Prime Gap

Time Limit: 1 secs, Memory Limit: 32 MBDescriptionThe sequence of n ? 1 consecutive composite numbers (positive integers that are not prime and not equal to 1) lying between two successive prime number

2016-01-09 21:01:35 639

原创 Sicily 1790. Single Round Match

Time Limit: 1 secs, Memory Limit: 32 MBDescriptionAssociation for Couples Match (ACM) is a non-profit organization which is engaged in helping single people to find his/her other half. As November 11th

2016-01-09 18:53:44 424

原创 Sicily 1753. 解码

Time Limit: 1 secs, Memory Limit: 32 MBDescriptionZX是另一头04级的牛,他现在在UPen。他跟LLK经常通信,但他不喜欢直接把信息发给LLK,而是把信息通过一个规则转换后再发给LLK,这让LLK很郁闷。他的规则如下:如果字符x出现的n次,则将这几个连在一起的字符表示为xn,例如aaa->a3。为了能读取ZX的信息,亲爱的师弟师妹们,你们可以帮LLK

2016-01-09 18:14:00 596

原创 Sicily 1793. Numbers

Time Limit: 1 secs, Memory Limit: 32 MBDescriptionGiven the greatest common divisor(GCD) and the least common multiple(LCM) of two integers a and b (a <= b), please find the minimum of b-a.InputInput m

2016-01-09 16:47:00 339

原创 Sicily 1782. Knapsack

Time Limit: 1 secs, Memory Limit: 63.9990234375 MBDescriptionJohn wants to carry several items with a knapsack. Each item has integral size and can not be divided into smaller parts. The knapsack also

2016-01-09 15:51:31 748

原创 Sicily 1190. Reduced ID Numbers 简单哈希

Time Limit: 2 secs, Memory Limit: 32 MBDescriptionT. Chur teaches various groups of students at university U. Every U-student has a unique Student Identification Number (SIN). A SIN s is an integer in

2016-01-09 12:26:57 430

原创 Sicily 1691. Abundance

Time Limit: 1 secs, Memory Limit: 32 MBDescriptionAn abundant number is a positive integer n for which Sigma(n) – 2n > 0, Where Sigma(n) is defined as the sum of all the divisors of n. And the quantity

2016-01-09 11:08:15 391

原创 Sicily 1624. Cryptoquote

Time Limit: 1 secs, Memory Limit: 32 MBDescriptionA cryptoquote is a simple encoded message where one letter is simply replaced by another throughout the message. For example:Encoded: HPC PJVYMIY Dec

2016-01-09 10:46:46 485

原创 Sicily 1721. Gray code

Time Limit: 1 secs, Memory Limit: 32 MB , Special JudgeDescriptionGray code is an interesting code sequence and has many applications in computer science. No matter you have known it before or not, her

2016-01-08 22:32:51 414

原创 Sicily 1128. DICE

Time Limit: 1 secs, Memory Limit: 32 MBDescriptionImagine looking at a six-sided die so two sides face east-west, two face north-south, and the last two sides face up-down. You could write down the num

2016-01-08 21:34:48 452

原创 Sicily 1286. Pascal Library

Time Limit: 1 secs, Memory Limit: 32 MBDescriptionPascal University, one of the oldest in the country, needs to renovate its Library Building, because after all these centuries the building started to

2016-01-08 19:06:13 519

原创 Sicily 1639. Run Length Encoding

Time Limit: 1 secs, Memory Limit: 32 MBDescriptionRun-length encoding is a simple compression technique which compresses strings of letters by replacing repeated consecutive letters (called runs) by th

2016-01-08 18:13:27 459

原创 Sicily 1390. Surprising Strings

Time Limit: 1 secs, Memory Limit: 32 MBDescriptionThe D-pairs of a string of letters are the ordered pairs of letters that are distance D from each other. A string is D-unique if all of its D-pairs are

2016-01-07 14:37:56 510

原创 Sicily 1394. Root of the Problem

Time Limit: 1 secs, Memory Limit: 32 MBDescriptionGiven positive integers B and N, find an integer A such that AN is as close as possible to B. (The result A is an approximation to the Nth root of B.)

2016-01-07 13:59:43 559

原创 Sicily 1530. The Seven Percent Solution

Time Limit: 1 secs, Memory Limit: 32 MBDescriptionUniform Resource Identifiers (or URIs) are strings like http://icpc.baylor.edu/icpc/, mailto:foo@bar.org, ftp://127.0.0.1/pub/linux, or even just readm

2016-01-07 12:15:55 575

原创 Sicily 1325. Digit Generator

Time Limit: 1 secs, Memory Limit: 32 MBDescriptionFor a positive integer N , the digit-sum of N is defined as the sum of N itself and its digits. When M is the digitsum of N , we call N a generator of

2016-01-07 01:18:13 305

原创 Sicily 1129. ISBN

Time Limit: 10 secs, Memory Limit: 32 MBDescriptionPractically every book that has been published during the past thirty years can be uniquely identified by its International Standard Book Number (ISBN

2016-01-07 00:39:09 346

原创 Sicily 1692. Cover Constraints

Time Limit: 1 secs, Memory Limit: 32 MBDescriptionTom wants to cover a rectangular floor by identical L-shape tiles without overlap. As shown below, the floor can be split into many small squares, and

2016-01-06 23:09:08 347

原创 Sicily 1209. Sequence Sum Possibi

Time Limit: 1 secs, Memory Limit: 32 MBDescriptionMost positive integers may be written as a sum of a sequence of at least two consecutive positive integers. For instance,6 = 1 + 2 + 3 9 = 5 + 4 = 2

2016-01-06 22:42:13 383

原创 Sicily 1218. 纪念邮票

Time Limit: 1 secs, Memory Limit: 32 MBDescription邮局最近推出了一套特殊的纪念邮票,这套邮票共有N张,邮票面值各不相同,按编号顺序为1分,2分,......,N分。小杭是个集邮爱好者,他很喜欢这套邮票,可惜现在他身上只有M分,并不够把全套都买下。他希望尽量买,最好刚好花光所有钱。作为一个集邮爱好者,小杭也不想买的邮票编号断断续续。所以小杭打算买面值a

2016-01-06 22:12:18 437

空空如也

空空如也

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

TA关注的人

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