acm
七刀
爱编程,爱学习,爱分享……
现在关注我的以后可都是老粉了……
展开
-
杭电 2561 第二小整数
第二小整数Problem Description求n个整数中倒数第二小的数。每一个整数都独立看成一个数,比如,有三个数分别是1,1,3,那么,第二小的数就是1。 Input输入包含多组测试数据。输入的第一行是一个整数C,表示有C测试数据;每组测试数据的第一行是一个整数n,表示本组测试数据有n个整数(2 Output请为每组测试数据原创 2013-07-07 16:30:47 · 813 阅读 · 2 评论 -
非常简单:一二三,注意观察各种情况的区别就行了
弟弟刚刚学会写英语的一(one)、二(two)和三(three)。他在纸上写了好些一二三,可惜有些字母写错了。已知每个单词最多有一个字母写错了(单词长度肯定不会错),你能认出他写的啥吗?原创 2013-08-19 21:00:22 · 1811 阅读 · 1 评论 -
报数游戏—看起来不好报啊,实际……
报数游戏n个人站成一行玩一个报数游戏。所有人从左到右编号为1到n。游戏开始时,最左边的人报1,他右边的人报2,编号为3的人报3,等等。当编号为n的人(即最右边的人)报完n之后,轮到他左边的人(即编号为n-1的人)原创 2013-08-19 20:50:10 · 2028 阅读 · 0 评论 -
杭电2602(01背包问题)——第一次做背包问题的理解
杭电2602(01背包问题)——第一次做背包问题的理解Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , ……原创 2013-07-19 11:28:55 · 988 阅读 · 0 评论 -
今天看到了三年前杭电的LCY老师写的一篇自我检讨,值得大家来读一读
该我自己检讨了_By LCYPosted by Admin_LCYat 2010-05-05 00:54:33(65) 首先,我想说,下面检讨的很多问题并不是现在才有,去年或许更早就已经逐步显现出来,只不过还算过得去的比赛成绩,特别是去年幸转载 2013-07-13 20:16:09 · 2376 阅读 · 3 评论 -
一位acmer的竞赛心得
刻苦的训练我打算最后稍微提一下。主要说后者:什么是有效地训练?我想说下我的理解。很多ACMer入门的时候,都被告知:要多做题,做个500多道就变牛了。其实,这既不是充分条件、也不会是必要条件。我觉得一般情况下,对于我们普通学校的大学生,各方面能力的差距不会太大,在这种情况下,训练和学习的方法尤为重要。其实,500题仅仅是一个标志,而且仅仅表示你做ACM-IC转载 2013-07-12 21:51:24 · 839 阅读 · 0 评论 -
A simple problem
A simple problem题目描述Dreamone has a lovely cat. The cat can comfort you if you are very dejected, she can also play with you if you are very bored. So Dreamone loves her very much. Of cours原创 2013-07-12 21:17:37 · 796 阅读 · 0 评论 -
Help Johnny-(类似杭电acm3568题)
Help Johnny 杭电acm 3568原创 2013-07-12 14:47:55 · 919 阅读 · 0 评论 -
杭电1012——终于学会用C++保留小数了
u Calculate eProblem DescriptionA simple mathematical formula for e iswhere n is allowed to go to infinity. This can actually yield very accurate approximations of e using relatively small原创 2013-07-10 17:14:50 · 1206 阅读 · 0 评论 -
The mell hall——坑爹
The mell hall题目描述In HUST,there are always manystudents go to the mell hall at the same time as soon as the bell rings.Students have to queue up for a meal,and the queue is awalys long,So it take原创 2013-07-09 11:26:28 · 904 阅读 · 0 评论 -
Even Odds代码与分析,有注释
Even OddsBeing a nonconformist, Volodya is displeasedwith the current state of things, particularly with the order of naturalnumbers (natural number is positive integer number). He is determined tor原创 2013-07-06 16:40:43 · 937 阅读 · 0 评论 -
人见人爱A^BmodC的二分思想
人见人爱A^BmodC 计算A的B次幂对c取模(A^BmodC)并且1输入三个整数A,B,C,输入文件每一行依次三个整数a,b,c用空格隔开每行输出一个运算结果Input:3 4 510 10 10045 67 891 1 1 Output:10450分析:主要用到乘方取模的算法:(a*b)%c=((a%原创 2013-07-06 16:56:42 · 929 阅读 · 0 评论 -
汽水瓶的问题,别被问题吓倒了,特简单!!
汽水瓶 题目描述有这样一道智力题:“某商店规定:三个空汽水瓶可以换一瓶汽水。小张手上有十个空汽水瓶,她最多可以换多少瓶汽水喝?”答案是5瓶,方法如下:先用9个空瓶子换3瓶汽水,喝掉3瓶满的,喝完以后4个空瓶子,用3个再换一瓶,喝掉这瓶满的,这时候剩2个空瓶子。然后你让老板先借给你一瓶汽水,喝掉这瓶满的,喝完以后用3个空瓶子换一瓶满原创 2013-07-06 18:10:59 · 1135 阅读 · 1 评论 -
盒子问题:规律观察很重要,取石子?NO!
有两个相同的盒子,其中一个装了n个球,另一个装了一个球。Alice和Bob发明了一个游戏,规则如下:Alice和Bob轮流操作,Alice先操作。每次操作时,游戏者先看看哪个盒子里的球的数目比较少,然后清空这个盒子(盒子里的球直接扔掉),然后把另一个盒子里的球拿一些到这个盒子中,使得两个盒子都至少有一个球。如果一个游戏者无法进行操作,他(她)就输了。原创 2013-08-19 21:09:30 · 1064 阅读 · 0 评论 -
Matrix Multiplication
Matrix Multiplication题目描述Johnny and John are good friends. Johnny is going to take the entrance exams for postgraduate schools. Recently, he is reviewing Linear Algebra. Johnny always says原创 2013-07-12 21:12:53 · 825 阅读 · 0 评论 -
南阳数乌龟——递归超时
数乌龟有一只母乌龟,它每年年初生一头小母乌龟。每头小母乌龟第四个年头开始,每年年初生一头小母乌龟。请你计算第n年是共有多少只母乌龟 (第一年是有一头母乌龟)输入输入多组测试数据,每组测试数据占一行,输入一个整数n(0输出每组输出数据占一行,输出第在第n年原创 2013-07-19 11:06:55 · 943 阅读 · 0 评论 -
Eming
问题 A : Eming题目描述Eming is a contest hold by WHUACM training team. The aim is to select new members of the team. Usually, the first problem is a very simple problem such as “a+b problem”. But this原创 2013-07-08 08:55:45 · 1024 阅读 · 0 评论 -
Arithmetic Progression超时了n次,终于过了!
Arithmetic Progression题目描述“In mathematics, an arithmetic progression (AP) or arithmetic sequence is a sequence of numbers such that the difference between the consecutive terms is constant. For in原创 2013-07-08 15:44:04 · 1179 阅读 · 0 评论 -
Brackets---卡特兰数
Brackets题目描述This year MK is 5 years old. So he decides to learn some arithmetic. But he was confused by how to write the brackets. He has already known that the brackets should match when writing原创 2013-07-08 20:55:53 · 805 阅读 · 0 评论 -
杭电 1008 Elevator
ElevatorProblem DescriptionThe 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, i原创 2013-07-07 23:29:28 · 706 阅读 · 0 评论 -
杭电 2563 统计问题
统计问题Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4004 Accepted Submission(s): 2341Problem Description在一无限大的二维平面中,我们做如下假设:1、原创 2013-07-07 17:04:06 · 1006 阅读 · 0 评论 -
Strings of Power
Strings of PowerVolodya likes listening to heavy metal and(occasionally) reading. No wonder Volodya is especially interested in textsconcerning his favourite music style.Volodya calls a string pow原创 2013-07-06 23:38:23 · 690 阅读 · 0 评论 -
sscanf函数具体用法举例,与其他函数(例如atoi)的比较
sscanf()函数具体用法举例,与其他函数的比较例题:Help a PhD candidate out! DescriptionJon Marius forgot how to add two numbers whiledoing research for his PhD. And now he has along list of addition problems that he needs ...原创 2018-03-11 16:13:27 · 552 阅读 · 0 评论