编程语言 C、C++
文章平均质量分 52
子丅
夜未央 乐未殇
展开
-
Windows实现俄罗斯方块
俄罗斯方块项目实验报告Email: Ludenghui.cs@gmail.com摘要 《俄罗斯方块》(俄语:Тетрис,英语:Tetris),是上世纪80年末期至90年代初期风靡全世界的电脑游戏,是落下型益智游戏的始祖,为苏联首个在美国发布的娱乐软件。该游戏最初是由阿列克谢·帕基特诺夫在苏联设计和编程,于1984年6月6日首次发布,当时帕基特诺夫正在苏联科学院电算中心工作原创 2018-01-04 15:02:37 · 2827 阅读 · 0 评论 -
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 · 438 阅读 · 0 评论 -
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 · 508 阅读 · 0 评论 -
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 · 447 阅读 · 0 评论 -
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 · 490 阅读 · 0 评论 -
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 · 545 阅读 · 0 评论 -
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 · 563 阅读 · 0 评论 -
Sicily 1134. 积木分发
/// Sicily 1134题 积木分发> 1134. 积木分发 [Test](http://soj.sysu.edu.cn/1134)ConstraintsTime Limit: 10 secs, Memory Limit: 32 MBDescription歌手The Pancakes到幼儿园跟小朋友玩耍,她到达的时候小朋友们已经争着积木玩了。小朋友都想要更多的积木砌一个自己喜欢的图形,砌原创 2015-12-29 21:40:47 · 1010 阅读 · 0 评论 -
Sicily 1003. Hit or Miss
CSDN博客征程正式开始!Sicily 1003题 Link Text ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionOne very simple type of solitaire game known as “Hit or Miss” (also known as “Frustration,” “Harves原创 2015-12-17 01:56:04 · 442 阅读 · 0 评论 -
Sicily 1001. Alphacode
Sicily 1001题 // NO.02 ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionAlice and Bob need to send secret messages to each othe原创 2015-12-20 02:10:08 · 582 阅读 · 0 评论 -
Sicily 1818. 成绩转换
ConstraintsTime Limit: 5 secs, Memory Limit: 32 MBDescription保存学生姓名和成绩,然后通过姓名查询该学生的成绩等级。输入为百分制的成绩,将其转换成对应的等级,具体转换规则如下:90~100 为 A; 80~89 为 B; 70~79 为 C; 60~69 为 D; 0~59 为 E;Input输入有多组数据。第一行为数据组数T。对于原创 2015-12-30 23:08:11 · 455 阅读 · 0 评论 -
Sicily 1159. Sum
Sicily /// 1159 SumConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionGiven several positive integers, calculate the sum of them. InputThere are several test cases, one line for each case. F原创 2015-12-30 14:17:14 · 514 阅读 · 0 评论 -
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 · 297 阅读 · 0 评论 -
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 · 472 阅读 · 0 评论 -
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 · 380 阅读 · 0 评论 -
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 · 420 阅读 · 0 评论 -
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 · 584 阅读 · 0 评论 -
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 · 492 阅读 · 0 评论 -
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 · 505 阅读 · 0 评论 -
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 · 720 阅读 · 0 评论 -
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 · 678 阅读 · 0 评论 -
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 · 401 阅读 · 0 评论 -
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 · 633 阅读 · 0 评论 -
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 · 628 阅读 · 0 评论 -
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 · 415 阅读 · 0 评论 -
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 · 586 阅读 · 0 评论 -
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 · 323 阅读 · 0 评论 -
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 · 739 阅读 · 0 评论 -
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 · 330 阅读 · 0 评论 -
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 · 335 阅读 · 0 评论 -
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 · 373 阅读 · 0 评论 -
最大连续子序列之和
Sicily 1888. Circular Seque最大连续子序列之和转载 2016-01-18 16:33:36 · 671 阅读 · 0 评论 -
使用cout输出两位小数
Sicily 1815. 计算两点间的距离ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription请用类描述顶点信息,输入两点坐标(X1,Y1),(X2,Y2),计算并输出两点间的距离。Input输入数据第一行一个整数 n,代表测试数据组数,接下来 n 行,每行由 4 个实数组成,分别表示 x1,y1,x2,y2,数据之间用空格隔开。原创 2015-12-31 01:02:06 · 4082 阅读 · 0 评论 -
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 · 627 阅读 · 0 评论 -
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 · 638 阅读 · 0 评论 -
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 · 432 阅读 · 0 评论 -
Sicily 4427. Greatest Common Divisors
练习使用pair来使函数返回多个值原创 2016-01-17 11:09:33 · 503 阅读 · 0 评论 -
Sicily 4868. 数字反转
整型数字翻转原创 2016-01-17 01:02:28 · 927 阅读 · 0 评论 -
Sicily 13476. 完数问题
Sicily 13476. 完数问题原创 2016-01-17 00:39:27 · 435 阅读 · 0 评论 -
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 · 607 阅读 · 0 评论