大数除法
摘要:/* 功能Function Description: 大数除法 开发环境Environment: DEV C++ 4.9.9.1 技术特点Technique: 版本Version: 作者Author: 可笑痴狂 日期Date: 20120731 备注Notes: 解题方法: 基本的思想是反复做减法,看看从被除数里最多能减去多少个除数,商就是多少。一个一个减显然太慢,如何减得更快一些呢? 以7546 除以23 为例来看一下:开始商为0。先减去23 的100 倍,就是230...
阅读全文
posted @
2012-07-31 17:52
可笑痴狂
阅读(2838)
推荐(0) 编辑
NYOJ-132 最长回文子串
摘要:最长回文子串时间限制:1000 ms | 内存限制:65535 KB难度:4描述输入一个字符串,求出其中最长的回文子串。子串的含义是:在原串连续出现的字符串片段。回文的含义是:正着看和倒着看是相同的,如abba和abbebba。在判断是要求忽略所有的标点和空格,且忽略大小写,但输出时按原样输出(首尾不要输出多余的字符串)。输入字符串长度大于等于1小于等于5000,且单独占一行(如果有多组答案,输出第一组)。输入输入一个测试数据n(1<=n<=10);随后有n行,每行有一个字符串。输出输出所要求的回文子串。样例输入1Confuciuss say:Madam,I'm Adam.
阅读全文
posted @
2012-07-30 16:50
可笑痴狂
阅读(2521)
推荐(0) 编辑
poj-百练2972 进制问题
摘要:题目连接:http://poj.grids.cn/practice/2972/ 1 /* 功能Function Description: 2 开发环境Environment: DEV C++ 4.9.9.1 3 技术特点Technique: 4 版本Version: 5 作者Author: 可笑痴狂 6 日期Date: 20120730 7 备注Notes: 8 描述 9 6*9 = 42 对于十进制来说是错误的,但是对于13进制来说是正...
阅读全文
posted @
2012-07-30 16:31
可笑痴狂
阅读(471)
推荐(0) 编辑
poj-百练2973:Skew数-- 进制问题
摘要:1 /* 功能Function Description: 2 开发环境Environment: DEV C++ 4.9.9.1 3 技术特点Technique: 4 版本Version: 5 作者Author: 可笑痴狂 6 日期Date: 20120730 7 备注Notes: 8 SubmitStatisticsClarifyTime Limit: 1000msMemory Limit: 65536kB 9 Description10 ...
阅读全文
posted @
2012-07-30 16:06
可笑痴狂
阅读(301)
推荐(0) 编辑
POJ 3278 Catch That Cow
摘要:Catch That CowTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 30924Accepted: 9536DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100,
阅读全文
posted @
2012-07-30 09:22
可笑痴狂
阅读(2686)
推荐(0) 编辑
HDOJ-2115 I Love This Game 排序问题
摘要:I Love This GameTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3528Accepted Submission(s): 1211Problem DescriptionDo you like playing basketball ? If you are , you may know the NBA Skills Challenge . It is the content of the basketball skills . It
阅读全文
posted @
2012-07-27 15:28
可笑痴狂
阅读(222)
推荐(0) 编辑
POJ 1928 The Peanuts
摘要:The PeanutsTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 6500Accepted: 2736DescriptionMr. Robinson and his pet monkey Dodo love peanuts very much. One day while they were having a walk on a country road, Dodo found a sign by the road, pasted with a small piece of paper, saying "Free
阅读全文
posted @
2012-07-27 11:47
可笑痴狂
阅读(595)
推荐(0) 编辑
NYOJ-116 士兵杀敌(二) 树状数组--插点问线
摘要:士兵杀敌(二)时间限制:1000 ms | 内存限制:65535 KB难度:5描述南将军手下有N个士兵,分别编号1到N,这些士兵的杀敌数都是已知的。小工是南将军手下的军师,南将军经常想知道第m号到第n号士兵的总杀敌数,请你帮助小工来回答南将军吧。南将军的某次询问之后士兵i可能又杀敌q人,之后南将军再询问的时候,需要考虑到新增的杀敌数。输入只有一组测试数据第一行是两个整数N,M,其中N表示士兵的个数(1<N<1000000),M表示指令的条数。(1<M<100000)随后的一行是N个整数,ai表示第i号士兵杀敌数目。(0<=ai<=100)随后的M行每行是一条
阅读全文
posted @
2012-07-26 18:59
可笑痴狂
阅读(361)
推荐(0) 编辑
poj-2080 Calendar
摘要:CalendarTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 8936Accepted: 3354DescriptionA calendar is a system for measuring time, from hours and minutes, to months and days, and finally to years and centuries. The terms of hour, day, month, year and century are all units of time measurements
阅读全文
posted @
2012-07-26 17:46
可笑痴狂
阅读(983)
推荐(0) 编辑
poj 1013 Counterfeit Dollar
摘要:Counterfeit DollarTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 33094Accepted: 10495DescriptionSally Jones has a dozen Voyageur silver dollars. However, only eleven of the coins are true silver dollars; one coin is counterfeit even though its color and size make it indistinguishable from
阅读全文
posted @
2012-07-26 16:10
可笑痴狂
阅读(2204)
推荐(0) 编辑
POJ-2210 Metric Time
摘要:Metric TimeTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 2369Accepted: 738DescriptionThe Metric Time is one of the most important points of PSOS Election Programme. The Time can be much easier calculated in operating systems. These systems are then more stable, which meets the main goal o
阅读全文
posted @
2012-07-26 13:42
可笑痴狂
阅读(496)
推荐(0) 编辑
大数乘法 zju 1217
摘要:大数乘 Time Limit:5000MS Memory Limit:32768KDescription:给定一些大数,请计算其积。Input:输入数据中含有一些整数对(对数≤1000),若某对整数(整数位数≤200)的值为0 0,则表示输入结束。Output:每对整数对应一个乘法计算结果,输出该结果,每个结果输出完后应回车。Sample Input:2 312 340 0Sample Output:6408 1 /* 功能Function Description: 大数相乘 2 开发环境Environment: DEV C++ 4.9.9.1 3 技术特...
阅读全文
posted @
2012-07-25 19:13
可笑痴狂
阅读(399)
推荐(0) 编辑
BUPT( 北邮)-2 大数 A-B
摘要:A-B ProblemAccept:627Submit:5002Time Limit:1000MSMemory Limit:65536KBDescriptionCalculate A-BInputTwo integer a and b(-10^100 < a,b < 10^100)OutputOutput a-bSample Input1 2Sample Output-1SourceBUPT Online Judge/* 功能 Function Description: 大数 A-B 开发环境 Environment: DEV C++ 4.9.9.1 作者 Auth...
阅读全文
posted @
2012-07-25 17:47
可笑痴狂
阅读(535)
推荐(0) 编辑
HDOJ 1372 Knight Moves
摘要:Knight MovesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3340Accepted Submission(s): 2087Problem DescriptionA friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves th
阅读全文
posted @
2012-07-25 11:46
可笑痴狂
阅读(519)
推荐(0) 编辑
hdoj 2030 汉子统计
摘要:#include<stdio.h> #include<string.h> int main() { int i,T,count; char str[1000]; scanf("%d",&T); getchar(); while(T--) { count=0; gets(str); /* int len=strlen(str); printf("%d\n",len); 输入“你大爷”,输出6,所以最后需要除2 */ for(i=0;str[i]!...
阅读全文
posted @
2012-07-24 22:05
可笑痴狂
阅读(229)
推荐(0) 编辑
HDOJ-2012 素数判定
摘要:素数判定Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 12Accepted Submission(s) : 7Problem Description对于表达式n^2+n+41,当n在(x,y)范围内取整数值时(包括x,y)(-39<=x<y<=50),判定该表达式的值是否都为素数。Input输入数据有多组,每组占一行,由两个整数x,y组成,当x=0,y=0时,表示输入结束,该行不做处理。Output对于每个给定范围内的取值,如
阅读全文
posted @
2012-07-24 20:20
可笑痴狂
阅读(1750)
推荐(0) 编辑
HDOJ-1230 火星A+B
摘要:火星A+BTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7782Accepted Submission(s): 2526Problem Description读入两个不超过25位的火星正整数A和B,计算A+B。需要注意的是:在火星上,整数不是单一进制的,第n位的进制就是第n个素数。例如:地球上的10进制数2,在火星上记为“1,0”,因为火星个位数是2进制的;地球上的10进制数38,在火星上记为“1,1,1,0”,因为火星个位数是2进制的,十位
阅读全文
posted @
2012-07-23 19:11
可笑痴狂
阅读(353)
推荐(0) 编辑
HDOJ-1257 最少拦截系统
摘要:最少拦截系统Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8767Accepted Submission(s): 3398Problem Description某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹.怎么办呢?多搞几套
阅读全文
posted @
2012-07-23 12:50
可笑痴狂
阅读(10028)
推荐(1) 编辑
HDOJ-1556 Color the ball
摘要:Color the ballTime Limit: 9000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3833Accepted Submission(s): 2081Problem DescriptionN个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球a开始到气球b依次给每个气球涂一次颜色。但是N次以后lele已经忘记了第I个气球已经涂过几次颜色了,你能帮他算出
阅读全文
posted @
2012-07-22 22:24
可笑痴狂
阅读(894)
推荐(0) 编辑
HDOJ-1142 A Walk Through the Forest
摘要:A Walk Through the ForestTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3140Accepted Submission(s): 1147Problem DescriptionJimmy experiences a lot of stress at work these days, especially since his accident made working difficult. To relax after a
阅读全文
posted @
2012-07-22 22:22
可笑痴狂
阅读(298)
推荐(0) 编辑
POJ -2236 Wireless Network
摘要:Wireless NetworkTime Limit: 10000MSMemory Limit: 65536KTotal Submissions: 12151Accepted: 5129DescriptionAn earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all computers in t
阅读全文
posted @
2012-07-21 10:47
可笑痴狂
阅读(2356)
推荐(0) 编辑
NYOJ-150 Train Problem I
摘要:Train Problem I时间限制:3000 ms | 内存限制:65535 KB难度:1描述As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is the fastest all over the world ^v^). But here comes a problem, there is o
阅读全文
posted @
2012-07-20 16:55
可笑痴狂
阅读(1302)
推荐(1) 编辑
Pku 1611 The Suspects
摘要:The SuspectsDescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is to separate the suspects from others. In the Not-Spreading-Your-Sickness Universi
阅读全文
posted @
2012-07-20 12:18
可笑痴狂
阅读(342)
推荐(0) 编辑
Ubiquitous Religions
摘要:Ubiquitous Religions Time Limit : 10000/5000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 2 Accepted Submission(s) : 2Problem DescriptionThere are so many different religions in the world today that it is difficult to keep track of them all. You are interested in...
阅读全文
posted @
2012-07-20 09:49
可笑痴狂
阅读(970)
推荐(0) 编辑
POJ 2255 Tree Recovery
摘要:Tree RecoveryTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 7819Accepted: 4947DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital letters in the nodes. This is an example of one of her creation
阅读全文
posted @
2012-07-06 09:55
可笑痴狂
阅读(511)
推荐(0) 编辑