摘要: NEU 1515:http://www.cnblogs.com/lzj-0218/p/4304547.html 阅读全文
posted @ 2015-02-27 23:27 ~~Snail~~ 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Aizu 2170: http://www.cnblogs.com/lzj-0218/p/3273342.html 阅读全文
posted @ 2013-08-21 20:06 ~~Snail~~ 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Codeforces 266A: http://www.cnblogs.com/lzj-0218/p/3234138.html 阅读全文
posted @ 2013-08-03 08:06 ~~Snail~~ 阅读(96) 评论(0) 推荐(0) 编辑
摘要: UVa 107:http://www.cnblogs.com/lzj-0218/p/3517151.htmlUVa 125:http://www.cnblogs.com/lzj-0218/p/3586634.htmlUVa 147:http://www.cnblogs.com/lzj-0218/p/3554664.htmlUVa 152:http://www.cnblogs.com/lzj-0218/p/3504377.htmlUVa 253:http://www.cnblogs.com/lzj-0218/p/3506856.htmlUVa 348:http://www.cnblogs.com 阅读全文
posted @ 2013-07-29 11:47 ~~Snail~~ 阅读(208) 评论(0) 推荐(0) 编辑
摘要: ZOJ 1610:http://www.cnblogs.com/lzj-0218/p/3458222.htmlZOJ 3551: http://www.cnblogs.com/lzj-0218/p/3219716.html 阅读全文
posted @ 2013-07-27 17:01 ~~Snail~~ 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Problem:BUN 1001: http://www.cnblogs.com/lzj-0218/p/3200677.htmlContest:第十一届北京师范大学程序设计竞赛: http://www.cnblogs.com/lzj-0218/archive/2013/04/30/3052354.html 阅读全文
posted @ 2013-07-19 15:42 ~~Snail~~ 阅读(230) 评论(0) 推荐(0) 编辑
摘要: Ural 1022: http://www.cnblogs.com/lzj-0218/archive/2013/05/12/3074527.html 阅读全文
posted @ 2013-05-12 21:01 ~~Snail~~ 阅读(114) 评论(0) 推荐(0) 编辑
摘要: BOJ 1 : http://www.cnblogs.com/lzj-0218/archive/2013/05/05/3060902.htmlBOJ1561 :http://www.cnblogs.com/lzj-0218/p/3181336.htmlBOJ 1562 : http://www.cnblogs.com/lzj-0218/p/3181351.htmlBOJ 1573 : http://www.cnblogs.com/lzj-0218/p/3187252.htmlBOJ 1575 : http://www.cnblogs.com/lzj-0218/p/3185578.htmlBOJ 阅读全文
posted @ 2013-05-05 13:57 ~~Snail~~ 阅读(122) 评论(0) 推荐(0) 编辑
摘要: HDU 1021: http://www.cnblogs.com/lzj-0218/archive/2013/05/14/3078581.htmlHDU 2035: http://www.cnblogs.com/lzj-0218/archive/2013/05/14/3078609.htmlHDU ... 阅读全文
posted @ 2013-05-04 17:29 ~~Snail~~ 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Heu OJ 百题解:1001:http://www.cnblogs.com/lzj-0218/p/3211971.html3201:http://www.cnblogs.com/lzj-0218/archive/2013/04/30/3051542.html 阅读全文
posted @ 2013-05-04 17:25 ~~Snail~~ 阅读(134) 评论(0) 推荐(0) 编辑
摘要: NEFU 2 :http://www.cnblogs.com/lzj-0218/archive/2013/05/04/3059826.htmlNEFU 109:http://www.cnblogs.com/lzj-0218/archive/2013/05/09/3069027.htmlNEFU 115:http://www.cnblogs.com/lzj-0218/archive/2013/04/30/3051546.htmlNEFU 117:http://www.cnblogs.com/lzj-0218/archive/2013/05/04/3059681.htmlNEFU 118:http 阅读全文
posted @ 2013-05-04 17:17 ~~Snail~~ 阅读(106) 评论(0) 推荐(0) 编辑
摘要: POJ 1001:http://www.cnblogs.com/lzj-0218/p/3528169.htmlPOJ 1017: http://www.cnblogs.com/lzj-0218/p/3246524.htmlPOJ 1035: http://www.cnblogs.com/lzj-0218/archive/2013/05/30/3108840.htmlPOJ 1047: http://www.cnblogs.com/lzj-0218/archive/2013/05/30/3108784.htmlPOJ 1050: http://www.cnblogs.com/lzj-0218/p 阅读全文
posted @ 2013-05-02 19:31 ~~Snail~~ 阅读(216) 评论(0) 推荐(0) 编辑
摘要: pairsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 96Accepted Submission(s): 38Problem Descripti... 阅读全文
posted @ 2015-02-28 22:08 ~~Snail~~ 阅读(742) 评论(1) 推荐(1) 编辑
摘要: 1515: Play whit bear kid时间限制:1 Sec内存限制:128 MB提交:3解决:2题目描述Happy Spring Festival everyone! Many relatives will visit your house, of course they have bea... 阅读全文
posted @ 2015-02-27 23:31 ~~Snail~~ 阅读(191) 评论(0) 推荐(0) 编辑
摘要: StarsTime Limit:1000MSMemory Limit:65536KTotal Submissions:29602Accepted:12924DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are not higher and not to the 阅读全文
posted @ 2014-03-07 16:46 ~~Snail~~ 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Numbering PathsBackgroundProblems that process input and generate a simple ``yes'' or ``no'' answer are called decision problems. One class of decision problems, the NP-complete problems, are not amenable to general efficient solutions. Other problems may be simple as decision proble 阅读全文
posted @ 2014-03-07 16:11 ~~Snail~~ 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #define MAX_V 10050 4 5 int V,E; //V表示顶点数,E表示边数(顶点标号为0~V-1) 6 vector G[MAX_V]; //图的邻接表表示 7 vector rG[MAX_V]; //把边反向后的图 8 vector vs; //后序遍历顺序的顶点列表(即用一个栈模拟了回溯时的标号) 9 bool used[MAX_V]; //DFS中用到的访问标记10 int cmp[MAX_V]; //顶点所属强连... 阅读全文
posted @ 2014-03-07 12:04 ~~Snail~~ 阅读(229) 评论(0) 推荐(0) 编辑
摘要: Popular CowsTime Limit:2000MSMemory Limit:65536KTotal Submissions:21685Accepted:8852DescriptionEvery cow's dream is to become the most popular cow in the herd. In a herd of N (1 2 #include 3 #include 4 #include 5 #define MAX_V 10050 6 7 using namespace std; 8 9 int V,E; 10 vector G[MAX_V]... 阅读全文
posted @ 2014-03-07 11:52 ~~Snail~~ 阅读(271) 评论(0) 推荐(0) 编辑
摘要: Count ColorTime Limit:1000MSMemory Limit:65536KTotal Submissions:33098Accepted:9995DescriptionChosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem.There is a very long board with length L centimeter, L is a posit 阅读全文
posted @ 2014-03-06 20:10 ~~Snail~~ 阅读(146) 评论(0) 推荐(0) 编辑
摘要: A Simple Problem with IntegersTime Limit:5000MSMemory Limit:131072KTotal Submissions:53810Accepted:16150Case Time Limit:2000MSDescriptionYou haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interv 阅读全文
posted @ 2014-03-06 10:30 ~~Snail~~ 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 在几何问题中,运用向量的内积和外积进行计算是非常方便的。对于二维向量p1=(x1,y1)和p2=(x2,y2),我们定义内积p1·p2=x1*x2+y1*y2,外积p1×p2=x1*y2-y1*x2。 要判断点q是否在线段p1-p2上,只要先用外积跟据是否有(p1-q)×(p2-q)=0来判断点q是否在直线p1-p2上,再利用内积根据是否有(p1-q)·(p2-q)≤0来判断点q是否落在p1-p2之间。 要判断两条线段是否有交点,可以先求出两条线段所在直线的交点,再判断交点是否在两条线段上。(这里要注意考虑两条线段平行的情况,这种情况下不能直接求两条直线 阅读全文
posted @ 2014-02-28 21:52 ~~Snail~~ 阅读(733) 评论(0) 推荐(0) 编辑
摘要: Jack StrawsTime Limit:1000MSMemory Limit:10000KTotal Submissions:2942Accepted:1331DescriptionIn the game of Jack Straws, a number of plastic or wooden "straws" are dumped on the table and players try to remove them one-by-one without disturbing the other straws. Here, we are only concerned 阅读全文
posted @ 2014-02-28 21:39 ~~Snail~~ 阅读(277) 评论(0) 推荐(0) 编辑
摘要: Return of the AztecsProblem C:Homer SimpsonTime Limit: 3 secondsMemory Limit: 32 MBHomer Simpson, a very smart guy, likes eating Krusty-burgers. It takes Homer m minutes to eat a Krusty- burger. However, there�s a new type of burger in Apu�s Kwik-e-Mart. Homer likes those too. It takes him n minutes 阅读全文
posted @ 2014-02-27 21:12 ~~Snail~~ 阅读(345) 评论(0) 推荐(0) 编辑
摘要: Problem CLongest Run on a SnowboardInput:standard inputOutput:standard outputTime Limit:5 secondsMemory Limit:32 MBMichael likes snowboarding. That's not very surprising, since snowboarding is really great. The bad thing is that in order to gain speed, the area must slide downwards. Another disa 阅读全文
posted @ 2014-02-27 21:05 ~~Snail~~ 阅读(326) 评论(0) 推荐(0) 编辑
摘要: The Tower of BabylonPerhaps you have heard of the legend of the Tower of Babylon. Nowadays many details of this tale have been forgotten. So now, in l... 阅读全文
posted @ 2014-02-27 20:57 ~~Snail~~ 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Problem DThe Tourist GuideInput:standard inputOutput:standard outputMr. G. works as a tourist guide. His current assignment is to take some tourists from one city to another. Some two-way roads connect the cities. For each pair of neighboring cities there is a bus service that runs only between thos 阅读全文
posted @ 2014-02-27 20:40 ~~Snail~~ 阅读(396) 评论(0) 推荐(0) 编辑
摘要: Problem C: Arctic NetworkThe Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the network: every outpost will have a radio transceiver and some outposts will in addition hav 阅读全文
posted @ 2014-02-27 19:03 ~~Snail~~ 阅读(326) 评论(0) 推荐(0) 编辑
摘要: Problem EConnect the CampusInput:standard inputOutput:standard outputTime Limit:2 secondsMany new buildings are under construction on the campus of theUniversityofWaterloo. The university has hired bricklayers, electricians, plumbers, and a computer programmer. A computer programmer? Yes, you have b 阅读全文
posted @ 2014-02-27 15:06 ~~Snail~~ 阅读(347) 评论(0) 推荐(0) 编辑
摘要: CompromiseIn a few months the European Currency Union will become a reality. However, to join the club, the Maastricht criteria must be fulfilled, and this is not a trivial task for the countries (maybe except for Luxembourg). To enforce that Germany will fulfill the criteria, our government has so 阅读全文
posted @ 2014-02-25 21:18 ~~Snail~~ 阅读(179) 评论(0) 推荐(0) 编辑
摘要: SuperSaleThere is a SuperSale in a SuperHiperMarket. Every person can take only one object of each kind, i.e. one TV, one carrot, but for extra low price. We are going with a whole family to that SuperHiperMarket. Every person can take as many objects, as he/she can carry out from the SuperSale. We 阅读全文
posted @ 2014-02-25 21:12 ~~Snail~~ 阅读(203) 评论(0) 推荐(0) 编辑
摘要: CDYou have a long drive by car ahead. You have a tape recorder, but unfortunately your best music is on CDs. You need to have it on tapes so the problem to solve is: you have a tapeNminutes long. How to choose tracks from CD to get most out of tape space and have as short unused space as possible.As 阅读全文
posted @ 2014-02-25 21:08 ~~Snail~~ 阅读(362) 评论(0) 推荐(0) 编辑