摘要:
原文:http://blog.csdn.net/pathuang68/article/details/66928821. 简单介绍有时候,需要将汉字编程对应的拼音,以方便数据的处理。比如在Android手机应用的开发上,要查询联系人的姓名,通常都是用拼音进行查询的。比如要查询“曹孟德”,就可以输入“... 阅读全文
摘要:
上题目:A simple problemTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2918Accepted Submission(s): 1041Problem DescriptionZty很痴迷数学问题.。一天,yifenfei出了个数学题想难倒他,让他回答1 / n。但Zty却回答不了^_^. 请大家编程帮助他.Input第一行整数T,表示测试组数。后面T行,每行一个整数 n (1 2 #include 3 #define MAX . 阅读全文
摘要:
先上题目:D -DiscoverTime Limit:0MSMemory Limit:0KB64bit IO Format:%lld & %lluSubmitStatusPracticeSCU 4117DescriptionTime Limit: 3000 MS Memory Limit: 65536 KDescription GLC has developed an algorithm to map each lattice point in the 2-d catesian coordinates to a nature number. For example:(0, 0) -&g 阅读全文
摘要:
先上题目:4110: PE classSubmit your solutionDiscuss this problemBest solutionsDescriptionThe dwarven kingdom and the giant countries classmates have PE class together. The students' height from 1 cm to N cm,everyone's height is different from other's.There are N students in total, and there a 阅读全文
摘要:
先上题目:跑跑卡丁车Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2145Accepted Submission(s): 726Problem Description跑跑卡丁车是时下一款流行的网络休闲游戏,你可以在这虚拟的世界里体验驾驶的乐趣。这款游戏的特别之处是你可以通过漂移来获得一种加速卡,用这种加速卡可以在有限的时间里提高你的速度。为了使问题简单化,我们假设一个赛道分为L段,并且给你通过每段赛道的普通耗时Ai和用加速卡的耗时Bi。加速卡 阅读全文
摘要:
先上题目:Magic NumberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1433Accepted Submission(s): 605Problem DescriptionThere are many magic numbers whose lengths are less than 10. Given some queries, each contains a single number, if the Levenshtein di 阅读全文
摘要:
先上题目:H. Queries for Number of Palindromestime limit per test5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou've got a strings = s1s2...s|s|of length|s|, consisting of lowercase English letters. There also areqqueries, each query is described by two integersl 阅读全文
摘要:
先上题目:City GameTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4101Accepted Submission(s): 1710Problem DescriptionBob is a strategy game programming specialist. In his new city building game the gaming environment is as follows: a city is built up b 阅读全文
摘要:
先上题目:Largest Rectangle in a HistogramTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9826Accepted Submission(s): 2717Problem DescriptionA histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have 阅读全文
摘要:
先上题目:Instantaneous TransferenceTime Limit:5000MSMemory Limit:65536KTotal Submissions:5461Accepted:1193DescriptionIt was long ago when we played the game Red Alert. There is a magic function for the game objects which is called instantaneous transfer. When an object uses this magic function, it will 阅读全文
摘要:
出处:http://blog.csdn.net/xinghongduo/article/details/6195337 说到以Tarjan命名的算法,我们经常提到的有3个,其中就包括本文所介绍的求强连通分量的Tarjan算法。而提出此算法的普林斯顿大学的Robert E Tarjan教授也是1986年的图灵奖获得者(具体原因请看本博“历届图灵奖得主”一文)。 首先明确几个概念。强连通图。在一个强连通图中,任意两个点都通过一定路径互相连通。比如图一是一个强连通图,而图二不是。因为没有一条路使得点4到达点1、2或3。强连通分量。在一个非强连通图中极大的强连通子图就是该图的强连通分量。比如图三... 阅读全文
摘要:
先上题目:Summer HolidayTime Limit: 10000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1337Accepted Submission(s): 607Problem DescriptionTo see a World in a Grain of SandAnd a Heaven in a Wild Flower,Hold Infinity in the palm of your handAnd Eternity in an hour.—— Wi 阅读全文
摘要:
先上题目:最大子矩阵Time Limit: 30000/10000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2523Accepted Submission(s): 1288Problem Description给你一个m×n的整数矩阵,在上面找一个x×y的子矩阵,使子矩阵中所有元素的和最大。Input输入数据的第一行为一个正整数T,表示有T组测试数据。每一组测试数据的第一行为四个正整数m,n,x,y(0 2 #include 3 #define MAX 100 阅读全文
摘要:
先上题目:The more, The BetterTime Limit: 6000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4701Accepted Submission(s): 2777Problem DescriptionACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中ACboy允许攻克M个城堡并获得里面的宝物。但由于地理位置原因,有些城堡不能直接攻克,要攻克这些城堡必须先攻克其他某一个特定的城堡。你能帮ACboy算出要 阅读全文
摘要:
先上题目:DividingTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14505Accepted Submission(s): 4064Problem DescriptionMarsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of 阅读全文
摘要:
先上题目:Problem 2062 Suneast & YayamaoAccept: 146Submit: 319Time Limit: 1000 mSecMemory Limit : 32768 KBProblem DescriptionYayamao is so cute that people loves it so much.Everyone wants to buy Yayamao from Suneast (a business man who sells Yayamao).Suneast is a strange business man. He sells Yayama 阅读全文
摘要:
先上题目:1232 - Coin Change (II)PDF (English)StatisticsForumTime Limit:1 second(s)Memory Limit:32 MBIn a strange shop there arentypes of coins of valueA1, A2... An. You have to find the number of ways you can makeKusing the coins. You can use any coin at mostKtimes.For example, suppose there are three c 阅读全文
摘要:
先上题目:1231 - Coin Change (I)PDF (English)StatisticsForumTime Limit:1 second(s)Memory Limit:32 MBIn a strange shop there arentypes of coins of valueA1, A2... An.C1, C2, ... Cndenote the number of coins of valueA1, A2... Anrespectively. You have to find the number of ways you can makeKusing the coins.F 阅读全文
摘要:
先上题目:Gaussian PrimeTime Limit:3 Seconds Memory Limit:65536 KBIn number theory, a Gaussian integer is a complex number whose real and imaginary part are both integers. The Gaussian integers, with ordinary addition and multiplication of complex numbers, form an integral domain, usually written asZ[i]. 阅读全文
摘要:
自己总结的模板,需要根据具体情况添加或者修改一部分操作。 1 #include 2 #include 3 #define max(x,y) (x > y ? x : y) //判断区间最值的操作符 4 #define INF (1mid){ 56 //当前子树的右子树中包含查询范围的一部分 57 e=query(l,r,p*2+1); 58 ans=max(ans,e); 59 } 60 return ans; 61 } 62 63 /** 64 * 将一个区间每一个元素的值更新为同一个新值,同时更... 阅读全文
摘要:
先上题目:ChopsticksTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1538Accepted Submission(s): 715Problem DescriptionIn China, people use a pair of chopsticks to get food on the table, but Mr. L is a bit different. He uses a set of three chopsticks -- 阅读全文
摘要:
先上题目:搬寝室Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14505Accepted Submission(s): 4882Problem Description搬寝室是很累的,xhd深有体会.时间追述2006年7月9号,那天xhd迫于无奈要从27号楼搬到3号楼,因为10号要封楼了.看着寝室里的n件物品,xhd开始发呆,因为n是一个小于2000的整数,实在是太多了,于是xhd决定随便搬2*k件过去就行了.但还是会很累,因为2*k也不小是一 阅读全文
摘要:
先上题目:ACboy needs your helpTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3464Accepted Submission(s): 1792Problem DescriptionACboy has N courses this term, and he plans to spend at most M days on study.Of course,the profit he will gain from differe 阅读全文
摘要:
先上题目:Distribute MessageTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1186Accepted Submission(s): 547Problem DescriptionThe contest’s message distribution is a big thing in prepare. Assuming N students stand in a row, from the row-head start trans 阅读全文
摘要:
先上题目:Eddy's research IITime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2788Accepted Submission(s): 1019Problem DescriptionAs is known, Ackermann function plays an important role in the sphere of theoretical computer science. However, in the oth 阅读全文
摘要:
先上题目:B. Running Studenttime limit per test1 secondmemory limit per test64 megabytesAnd again a misfortune fell on Poor Student. He is being late for an exam.Having rushed to a bus stop that is in point(0, 0), he got on a minibus and they drove along a straight line, parallel to axisOX, in the direct 阅读全文
摘要:
2014.02.23http://acm.timus.ru/problem.aspx?space=1&num=1212http://acm.fzu.edu.cn/problem.php?pid=16082014.02.26http://codeforces.com/problemset/problem/6/Dhttp://codeforces.com/problemset/problem/6/E2012.03.03http://lightoj.com/volume_showproblem.php?problem=1232http://lightoj.com/volume_showpro 阅读全文
摘要:
先上题目:WuKongTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1070Accepted Submission(s): 384Problem DescriptionLiyuan wanted to rewrite the famous book “Journey to the West” (“Xi You Ji” in Chinese pinyin). In the original book, the Monkey King Sun W 阅读全文
摘要:
先上题目:Problem 1606 Format the expressionAccept: 87Submit: 390Time Limit: 1000 mSecMemory Limit : 32768 KBProblem DescriptionOaiei is a good boy who loves math very much, he would like to simplify some mathematical expression, can you help him? For the sake of simplicity, the form of expression he wan 阅读全文
摘要:
先上题目:Problem 1601 Alibaba's treasuresAccept: 332Submit: 636Time Limit: 1000 mSecMemory Limit : 32768 KBProblem DescriptionIn the story of “Alibaba and forty robbers”, Alibaba uses his clever wit to overcome the ferocious enemy, and inherits the huge treasure. There are many treasures which is th 阅读全文