随笔分类 -  编程

摘要:彼岸Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1887Accepted Submission(s): 1027Problem Description突破蝙蝠的包围,yifenfei来到一处悬崖面前,悬崖彼岸就是前进的方向,好在现在的yifenfei已经学过御剑术,可御剑轻松飞过悬崖。现在的问题是:悬崖中间飞着很多红,黄,蓝三种颜色的珠子,假设我们把悬崖看成一条长度为n的线段,线段上的每一单位长度空间都可能飞过红,黄,蓝三种珠子,而yife 阅读全文
posted @ 2012-07-22 20:32 ismdeep 阅读(403) 评论(0) 推荐(0)
摘要:前m大的数Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5195Accepted Submission(s): 1856Problem Description还记得Gardon给小希布置的那个作业么?(上次比赛的1005)其实小希已经找回了原来的那张数表,现在她想确认一下她的答案是否正确,但是整个的答案是很庞大的表,小希只想让你把答案中最大的M个数告诉她就可以了。给定一个包含N(N<=3000)个正整数的序列,每个数不超过5000,对它 阅读全文
posted @ 2012-07-22 15:52 ismdeep 阅读(515) 评论(0) 推荐(0)
摘要:寻梦Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2390Accepted Submission(s): 1871Problem Description每个人的童年都可能梦想过自己成为一个英雄,尤其是喜欢武侠的男生,Yifenfei也不例外。童年的他常常梦想自己能成为一个绝世英雄,手拿一把灿灿发亮的宝剑,手挽一位长发飘逸的秀丽气质MM ^_^ ,散步于清幽的泉边小道,微风吹过,飘落两片枫叶。。。。。。正由于成天陶醉于这种脱世的意境之中,导致此 阅读全文
posted @ 2012-07-21 17:14 ismdeep 阅读(466) 评论(1) 推荐(0)
摘要:命运Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4192Accepted Submission(s): 1482Problem Description穿过幽谷意味着离大魔王lemon已经无限接近了!可谁能想到,yifenfei在斩杀了一些虾兵蟹将后,却再次面临命运大迷宫的考验,这是魔王lemon设下的又一个机关。要知道,不论何人,若在迷宫中被困1小时以上,则必死无疑!可怜的yifenfei为了去救MM,义无返顾地跳进了迷宫。让我们一起帮帮执 阅读全文
posted @ 2012-07-21 16:23 ismdeep 阅读(337) 评论(0) 推荐(0)
摘要:乘法游戏时间限制(普通/Java):1000MS/3000MS 运行内存限制:65536KByte总提交:8 测试通过:1描述乘法游戏是在一行牌上进行的。每一张牌包括了一个正整数。在每一个移动中,玩家拿出一张牌,得分是用它的数字乘以它左边和右边的数,所以不允许拿第1张和最后1张牌。最后一次移动后,这里只剩下两张牌。 你的目标是使得分的和最小。 例如,如果数是10 1 50 20 5,依次拿1、20、50,总分是10*1*50+50*20*5+10*50*5=8000 而拿50、20、1,总分是1*50*20+1*20*5+10*1*5=1150。 ... 阅读全文
posted @ 2012-07-21 14:12 ismdeep 阅读(353) 评论(1) 推荐(0)
摘要:CoinTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 662Accepted Submission(s): 329Problem DescriptionMoon has many coins, but only contains two value types which is 5 cents and 7 cents, Some day he find that he can get any value which greater than 阅读全文
posted @ 2012-07-20 11:25 ismdeep 阅读(618) 评论(0) 推荐(0)
摘要:Problem Description随着物理学的发展,科学家们发现了越来越多的粒子。有一天,筱莜在做实验的时候发现了一种麻烦的粒子,因为这些粒子必须成对产生或消失。面对这些粒子,筱莜开始头痛,怎么放置这些粒子才能让他们都消失呢?经过很多天的努力,筱莜终于设计出了一个实验装置,它是一个的立方体,编号A,B,C,……H,如图所示,每个顶点上都有一定数量的“麻烦”子,不同顶点初始的“麻烦”子数量可能不同。每次可以选择两个相邻的顶点,让他们同时产生或者消失。例如:每个照相机里的初始粒子数为1,0,1,0,3,1,0,0,那么一个合法的操作顺序为:EF-,EA-,AD+,AE-,DC-(EF-表示点E 阅读全文
posted @ 2012-07-20 11:23 ismdeep 阅读(265) 评论(0) 推荐(0)
摘要:要成为JAVA程序员,用三个月的时间.要成为J2EE高手,用一年的时间.要成为JAVA技术应用专家,用三年的时间,其中两年去学习C/C++现在我再次想说这样的话,如果你从来没有学过C/C++,那么我说一个JAVA技术,你可能永远也不可能真正的理解它的真正的意义:方法参数中JAVA的对象是如何传递的?真实的情况是传递"引用的值",如果你不了解C/C++,你是无法理解这句话的.你只能看别人的书上说什么你就记得什么,而实际如何,你根本不懂.这就是为什么要理解底层架构,协议.不了解你可能在一个公司混得很好,一个学习三个月JSP的人混一个工作是完全可以的,整天做一些ctrl+c,ct 阅读全文
posted @ 2012-07-19 11:13 ismdeep 阅读(223) 评论(0) 推荐(0)
摘要:Big NumberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15735Accepted Submission(s): 6954Problem DescriptionIn many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, 阅读全文
posted @ 2012-07-19 10:23 ismdeep 阅读(161) 评论(0) 推荐(0)
摘要:World Cup NoiseTime Limit:1000MSMemory Limit:30000KTotal Submissions:13155Accepted:6512DescriptionBackground"KO-RE-A, KO-RE-A" shout 54.000 happy football fans after their team has reached the semifinals of the FIFA World Cup in their home country. But although their excitement is real, th 阅读全文
posted @ 2012-07-18 14:48 ismdeep 阅读(213) 评论(0) 推荐(0)
摘要:次方求模时间限制:1000ms | 内存限制:65535KB难度:3描述求a的b次方对c取余的值输入第一行输入一个整数n表示测试数据的组数(n<100)每组测试只有一行,其中有三个正整数a,b,c(1=<a,b,c<=1000000000)输出输出a的b次方对c取余之后的结果样例输入32 3 53 100 1011 12345 12345样例输出3110481来源[张云聪]原创上传者张云聪 1 // Project name : 102 2 // File name : main.cpp 3 // Author : Izumu 4 // Date & Time : W 阅读全文
posted @ 2012-07-18 10:51 ismdeep 阅读(200) 评论(0) 推荐(0)
摘要:1 // Project name : 航线设置 2 // File name : main.cpp 3 // Author : Izumu 4 // Date & Time : Sun Jul 15 16:33:54 2012 5 6 7 #include <iostream> 8 #include <stdio.h> 9 #include <string>10 #include <cmath>11 #include <algorithm>12 using namespace std;13 14 #define MAXN 1 阅读全文
posted @ 2012-07-15 17:23 ismdeep 阅读(361) 评论(0) 推荐(0)
摘要:The sum problemTime Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9020Accepted Submission(s): 2759Problem DescriptionGiven a sequence 1,2,3,......N, your job is to calculate all the possible sub-sequences that the sum of the sub-sequence is M.InputInp 阅读全文
posted @ 2012-07-15 15:37 ismdeep 阅读(224) 评论(0) 推荐(0)
摘要:1 // Project name : 游船费问题 2 // File name : main.cpp 3 // Author : Izumu 4 // Date & Time : Sat Jul 14 15:21:28 2012 5 6 7 #include <iostream> 8 #include <stdio.h> 9 #include <string>10 #include <cmath>11 #include <algorithm>12 using namespace std;13 14 #define MAXN 阅读全文
posted @ 2012-07-14 16:10 ismdeep 阅读(318) 评论(0) 推荐(0)
摘要:Bone CollectorTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12318Accepted Submission(s): 4787Problem DescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such 阅读全文
posted @ 2012-07-14 10:42 ismdeep 阅读(171) 评论(0) 推荐(0)
摘要:Calculation 2Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1121Accepted Submission(s): 479Problem DescriptionGiven a positive integer N, your task is to calculate the sum of the positive integers less than N which are not coprime to N. A is said 阅读全文
posted @ 2012-07-13 20:36 ismdeep 阅读(402) 评论(0) 推荐(1)
摘要:Farey SequenceTime Limit:1000MSMemory Limit:65536KTotal Submissions:9180Accepted:3501DescriptionThe Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 < a < b <= n and gcd(a,b) = 1 arranged in increasing order. The first few areF2 = {1/2 阅读全文
posted @ 2012-07-13 17:11 ismdeep 阅读(209) 评论(0) 推荐(0)
摘要:RelativesTime Limit:1000MSMemory Limit:65536KTotal Submissions:8841Accepted:4134DescriptionGiven n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if there are no integers x > 1, y > 0, z > 0 such that a = xy a 阅读全文
posted @ 2012-07-13 16:23 ismdeep 阅读(169) 评论(0) 推荐(0)
摘要:除法表达式Time Limit(Common/Java):1000MS/10000MS Memory Limit:65536KByteTotal Submit: 279 Accepted: 68Description给出如下除法表达式E:X1/X2/X3/..../Xk其中Xi是正整数并且Xi<=2000000000(1<=i<=k,k<=10000)。除法表达式应当按照从左到右的顺序求结果,例如表达式1/2/1/2的值是1/4。现在让你可以在表达E中嵌入括号以改变计算顺序,例如表达式(1/2)/(1/2)的值是1。现在给你一个除法表达式E,要求告诉是否能够通过加括号( 阅读全文
posted @ 2012-07-12 17:03 ismdeep 阅读(704) 评论(0) 推荐(0)
摘要:Number StepsTime Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionStarting from point (0,0) on a plane, we have written all non-negative integers 0, 1, 2,... as shown in the figure. For example, 1, 2, and 3 has been written at points (1,1), 阅读全文
posted @ 2012-07-10 22:01 ismdeep 阅读(160) 评论(0) 推荐(0)