05 2013 档案

摘要:1、彻底删除mysql防止原有数据影响后续的安装和调试1 sudoapt-getautoremove--purgemysql-server-5.02 sudoapt-getremovemysql-server3 sudoapt-getautoremovemysql-server4 sudoapt-getremovemysql-common (非常重要)上面的其实有一些是多余的,建议还是按照顺序执行一遍清理残留数据dpkg-l|grep^rc|awk'{print$2}'|sudoxargsdpkg-P2, 安装 mysqlsudoapt-getinstallmysql-serv 阅读全文
posted @ 2013-05-31 11:49 Jack Ge 阅读(2867) 评论(0) 推荐(0) 编辑
摘要:不断学习中,,,,,,,,偶尔翻阅到一篇博客,印入眼帘的便是 《google真的很简单的》(http://blog.csdn.net/redguardtoo/article/details/500783),,看过之后,,,惭愧。。。。。。。。。。。然后翻阅到了看论文的网站,进去之后,发现确实不错,,还可以锻炼英文,,嘿嘿,,挺好的。。http://citeseer.ist.psu.edu/http://scholar.google.com/http://liinwww.ira.uka.de/bibliography/http://www.scirus.com以后再补充,也欢迎您的推荐。。。。。 阅读全文
posted @ 2013-05-30 18:44 Jack Ge 阅读(318) 评论(0) 推荐(1) 编辑
摘要:废话不多说,先上一个链接:(代码编辑神器VIM(附我写acm程序时的配置)(转)):http://www.cnblogs.com/ma6174/archive/2012/02/02/2335835.html第一次在笔记本上配置时没有错误(这很高兴呐,),可是,,来到实验室配置的时候,发现怎么都不对,经过半个多小时的检查,终于找出我的疏忽,,哎,原来是自己对路径理解的不够透彻:http://zhidao.baidu.com/question/504212321.html插播一段 vimrc的存放位置:系统 vimrc 文件: "$VIM/vimrc"用户 vimrc 文件: 阅读全文
posted @ 2013-05-30 16:39 Jack Ge 阅读(226) 评论(0) 推荐(0) 编辑
摘要:ZipperTime Limit:1000MSMemory Limit:65536KTotal Submissions:14127Accepted:4962DescriptionGiven three strings, you are to determine whether the third string can be formed by combining the characters in the first two strings. The first two strings can be mixed arbitrarily, but each must stay in its or 阅读全文
posted @ 2013-05-27 09:46 Jack Ge 阅读(293) 评论(0) 推荐(0) 编辑
摘要:Ice_cream's world ITime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 355Accepted Submission(s): 181Problem Descriptionice_cream's world is a rich country, it has many fertile lands. Today, the queen of ice_cream wants award land to diligent A 阅读全文
posted @ 2013-05-24 17:44 Jack Ge 阅读(537) 评论(0) 推荐(0) 编辑
摘要:Mondriaan's DreamTime Limit:3000MSMemory Limit:65536KTotal Submissions:9135Accepted:5280DescriptionSquares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use his toilet paper to draw on, f 阅读全文
posted @ 2013-05-24 16:36 Jack Ge 阅读(1362) 评论(0) 推荐(1) 编辑
摘要:Most PowerfulTime Limit:2 Seconds Memory Limit:65536 KBRecently, researchers on Mars have discovered N powerful atoms. All of them are different. These atoms have some properties. When two of these atoms collide, one of them disappears and a lot of power is produced. Researchers know the way every t 阅读全文
posted @ 2013-05-24 13:03 Jack Ge 阅读(436) 评论(0) 推荐(0) 编辑
摘要:Islands and BridgesTime Limit:4000MSMemory Limit:65536KTotal Submissions:7729Accepted:1977DescriptionGiven a map of islands and bridges that connect these islands, a Hamilton path, as we all know, is a path along the bridges such that it visits each island exactly once. On our map, there is also a p 阅读全文
posted @ 2013-05-24 07:51 Jack Ge 阅读(2492) 评论(0) 推荐(1) 编辑
摘要:Hie with the PieTime Limit:2000MSMemory Limit:65536KTotal Submissions:2969Accepted:1505DescriptionThe Pizazz Pizzeria prides itself in delivering pizzas to its customers as fast as possible. Unfortunately, due to cutbacks, they can afford to hire only one driver to do the deliveries. He will wait fo 阅读全文
posted @ 2013-05-24 06:24 Jack Ge 阅读(1471) 评论(1) 推荐(1) 编辑
摘要:炮兵阵地Time Limit:2000MSMemory Limit:65536KTotal Submissions:14869Accepted:5575Description司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示:如果在地图中的灰色所标识的平原上部署一支炮兵部队,则图中的黑色的网格表示它能够攻击到的区域:沿 阅读全文
posted @ 2013-05-23 23:23 Jack Ge 阅读(511) 评论(0) 推荐(0) 编辑
摘要:Corn FieldsTime Limit:2000MSMemory Limit:65536KTotal Submissions:4876Accepted:2573DescriptionFarmer John has purchased a lush new rectangular pasture composed ofMbyN(1 ≤M≤ 12; 1 ≤N≤ 12) square parcels. He wants to grow some yummy corn for the cows on a number of squares. Regrettably, some of the squ 阅读全文
posted @ 2013-05-23 23:05 Jack Ge 阅读(501) 评论(0) 推荐(1) 编辑
摘要:Rescue the RabbitTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1010Accepted Submission(s): 274Problem DescriptionDr. X is a biologist, who likes rabbits very much and can do everything for them. 2012 is coming, and Dr. X wants to take some rabb 阅读全文
posted @ 2013-05-23 21:57 Jack Ge 阅读(555) 评论(0) 推荐(0) 编辑
摘要:YY's new problemTime Limit: 12000/4000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 3158Accepted Submission(s): 890Problem DescriptionGiven a permutation P of 1 to N, YY wants to know whether there exists such three elements P[i1], P[i2], P[i3] thatP[i1]-P[i2]=P[ 阅读全文
posted @ 2013-05-23 12:57 Jack Ge 阅读(273) 评论(0) 推荐(0) 编辑
摘要:测试你是否和LTC水平一样高Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10092Accepted Submission(s): 3254Problem Description大家提到LTC都佩服的不行,不过,如果竞赛只有这一个题目,我敢保证你和他绝对在一个水平线上!你的任务是:计算方程x^2+y^2+z^2= num的一个正整数解。Input输入数据包含多个测试实例,每个实例占一行,仅仅包含一个小于等于10000的正整数num。Outpu 阅读全文
posted @ 2013-05-23 12:38 Jack Ge 阅读(276) 评论(0) 推荐(0) 编辑
摘要:SORT AGAINTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3092Accepted Submission(s): 987Problem Description给你N个整数,x1,x2...xn,任取两个整数组合得到|xi-xj|,(0<i,j<=N,i!=j)。现在请你计算第K大的组合数是哪个(一个组合数为第K大是指有K-1个不同的组合数小于它)。Input输入数据首先包含一个正整数C,表示包含C组测试用例.每组测试数据的 阅读全文
posted @ 2013-05-23 12:25 Jack Ge 阅读(324) 评论(0) 推荐(0) 编辑
摘要:SubstringsTime Limit:1000MSMemory Limit:10000KTotal Submissions:10244Accepted:3515DescriptionYou are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse can be found as a substring of any of the given strings.InputThe first 阅读全文
posted @ 2013-05-23 11:12 Jack Ge 阅读(563) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;const int maxn=50;int equ,var; //行数,列数int a[maxn][maxn]; //增广矩阵int x[maxn]; //解集bool free_x[maxn]; //标记是否是不确定的变元void Debug(){ int i,j; for(i=0;i<equ;i++){ for(j=0;j<var+1;j++) pr.. 阅读全文
posted @ 2013-05-23 07:28 Jack Ge 阅读(592) 评论(0) 推荐(0) 编辑
摘要:Painter's ProblemTime Limit:1000MSMemory Limit:10000KTotal Submissions:3880Accepted:1889DescriptionThere is a square wall which is made of n*n small square bricks. Some bricks are white while some bricks are yellow. Bob is a painter and he wants to paint all the bricks yellow. But there is somet 阅读全文
posted @ 2013-05-22 23:36 Jack Ge 阅读(508) 评论(0) 推荐(0) 编辑
摘要:EXTENDED LIGHTS OUTTime Limit:1000MSMemory Limit:10000KTotal Submissions:5383Accepted:3557DescriptionIn an extended version of the game Lights Out, is a puzzle with 5 rows of 6 buttons each (the actual puzzle has 5 rows of 5 buttons each). Each button has a light. When a button is pressed, that butt 阅读全文
posted @ 2013-05-22 22:52 Jack Ge 阅读(1589) 评论(0) 推荐(0) 编辑
摘要:排列2Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3107Accepted Submission(s): 1220Problem DescriptionRay又对数字的列产生了兴趣:现有四张卡片,用这四张卡片能排列出很多不同的4位数,要求按从小到大的顺序输出这些4位数。Input每组数据占一行,代表四张卡片上的数字(0<=数字<=9),如果四张卡片都是0,则输入结束。Output对每组卡片按从小到大的顺序输出所有能由这四张卡片组 阅读全文
posted @ 2013-05-22 16:53 Jack Ge 阅读(4024) 评论(0) 推荐(0) 编辑
摘要:EquationsTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3853Accepted Submission(s): 1551Problem DescriptionConsider equations having the following form:a*x1^2+b*x2^2+c*x3^2+d*x4^2=0a, b, c, d are integers from the interval [-50,50] and any of them 阅读全文
posted @ 2013-05-22 16:10 Jack Ge 阅读(175) 评论(0) 推荐(0) 编辑
摘要:The Troublesome FrogTime Limit:5000MSMemory Limit:100000KTotal Submissions:9126Accepted:2749Case Time Limit:500MSDescriptionIn Korea, the naughtiness of the cheonggaeguri, a small frog, is legendary. This is a well-deserved reputation, because the frogs jump through your rice paddy at night, flatten 阅读全文
posted @ 2013-05-22 14:22 Jack Ge 阅读(608) 评论(0) 推荐(0) 编辑
摘要:694. Distinct SubstringsProblem code: DISUBSTRhttp://www.spoj.com/problems/DISUBSTR/Given a string, we need to find the total number of its distinct substrings.InputT- number of test cases. T<=20;Each test case consists of one string, whose length is <= 1000OutputFor each test case output one 阅读全文
posted @ 2013-05-22 08:34 Jack Ge 阅读(308) 评论(0) 推荐(0) 编辑
摘要:Milk PatternsTime Limit:5000MSMemory Limit:65536KTotal Submissions:7748Accepted:3522Case Time Limit:2000MSDescriptionFarmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he discovered that although he can't predict the quality of mi 阅读全文
posted @ 2013-05-22 08:14 Jack Ge 阅读(326) 评论(0) 推荐(0) 编辑
摘要:Musical ThemeTime Limit:1000MSMemory Limit:30000KTotal Submissions:14584Accepted:5026DescriptionA musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the piano. It is unfortunate but true that this representation 阅读全文
posted @ 2013-05-22 07:50 Jack Ge 阅读(226) 评论(0) 推荐(0) 编辑
摘要:Aeroplane chessTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 660Accepted Submission(s): 468Problem DescriptionHzz loves aeroplane chess very much. The chess map contains N+1 grids labeled from 0 to N. Hzz starts at grid 0. For each step he throws 阅读全文
posted @ 2013-05-21 23:27 Jack Ge 阅读(1177) 评论(0) 推荐(1) 编辑
摘要:MazeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 1055Accepted Submission(s): 347Special JudgeProblem DescriptionWhen wake up, lxhgww find himself in a huge maze.The maze consisted by N rooms and tunnels connecting these rooms. Each pair of rooms 阅读全文
posted @ 2013-05-21 23:04 Jack Ge 阅读(810) 评论(0) 推荐(0) 编辑
摘要:飞行棋Time Limit: 1000ms Memory limit: 65536K有疑问?点这里^_^题目描述飞行棋是在一个长度为n的棋盘上走动棋子的游戏。游戏开始时有一个棋子在棋盘的开始,位置是1。然后每一步玩家掷一次骰子,并将棋子往前跳骰子正面大小个格子。当棋子跳出飞行棋的棋盘时游戏结束。问游戏结束时玩游戏的人掷骰子次数的期望。输入第一行输入一个数T代表测试用例组数(T<=200),接下来T组测试用例,每组测试数据为棋盘大小。输出对于每个棋盘,输出玩家要掷骰子次数的期望(结果保留到小数点后4位)。每行输出一个结果。示例输入212示例输出1.00001.1667提示来源示例程序#in 阅读全文
posted @ 2013-05-21 22:58 Jack Ge 阅读(1039) 评论(0) 推荐(0) 编辑
摘要:One Person GameTime Limit:1 Second Memory Limit:32768 KB Special JudgeThere is a very simple and interesting one-person game. You have 3 dice, namelyDie1,Die2andDie3.Die1hasK1faces.Die2hasK2faces.Die3hasK3faces. All the dice are fair dice, so the probability of rolling each value, 1 toK1,K2,K3is exa 阅读全文
posted @ 2013-05-21 22:45 Jack Ge 阅读(888) 评论(1) 推荐(0) 编辑
摘要:Collecting BugsTime Limit:10000MSMemory Limit:64000KTotal Submissions:1485Accepted:647Case Time Limit:2000MSSpecial JudgeDescriptionIvan is fond of collecting. Unlike other people who collect post stamps, coins or other material stuff, he collects software bugs. When Ivan gets a new program, he clas 阅读全文
posted @ 2013-05-21 22:19 Jack Ge 阅读(1763) 评论(1) 推荐(0) 编辑
摘要:Scout YYF ITime Limit:1000MSMemory Limit:65536KTotal Submissions:3871Accepted:975DescriptionYYF is a couragous scout. Now he is on a dangerous mission which is to penetrate into the enemy's base. After overcoming a series difficulties, YYF is now at the start of enemy's famous "mine roa 阅读全文
posted @ 2013-05-21 22:06 Jack Ge 阅读(466) 评论(0) 推荐(0) 编辑
摘要:Holiday's AccommodationTime Limit: 8000/4000 MS (Java/Others)Memory Limit: 200000/200000 K (Java/Others)Total Submission(s): 1457Accepted Submission(s): 380Problem DescriptionNowadays, people have many ways to save money on accommodation when they are on vacation.One of these ways is exchanging 阅读全文
posted @ 2013-05-21 19:33 Jack Ge 阅读(244) 评论(0) 推荐(0) 编辑
摘要:The Ghost Blows LightTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1410Accepted Submission(s): 420Problem DescriptionMy name is Hu Bayi, robing an ancient tomb in Tibet. The tomb consists of N rooms (numbered from 1 to N) which are connected by s 阅读全文
posted @ 2013-05-21 19:13 Jack Ge 阅读(344) 评论(0) 推荐(0) 编辑
摘要:Python正则表达式操作指南 :http://wiki.ubuntu.org.cn/Python%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F%E6%93%8D%E4%BD%9C%E6%8C%87%E5%8D%97揭开正则表达式的神秘面纱[原创文章,转载请保留或注明出处:http://www.regexlab.com/zh/regref.htm]引言正则表达式(regular expression_r)就是用一个“字符串”来描述一个特征,然后去验证另一个“字符串”是否符合这个特征。比如 表达式“ab+” 描述的特征是“一个 'a' 阅读全文
posted @ 2013-05-21 16:26 Jack Ge 阅读(361) 评论(0) 推荐(0) 编辑
摘要:http://www.cnblogs.com/itech/archive/2009/12/15/1624120.htmlPython基本安装: *http://www.python.org/官方标准Python开发包和支持环境,同时也是Python的官方网站; *http://www.activestate.com/集成多个有用插件的强大非官方版本,特别是针对Windows环境有不少改进;Python文档: *http://www.python.org/doc/current/lib/lib.htmlPython库参考手册。 *http://www.byteofpython.info/... 阅读全文
posted @ 2013-05-21 16:25 Jack Ge 阅读(667) 评论(0) 推荐(0) 编辑
摘要:Information DisturbingTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 1018Accepted Submission(s): 376Problem DescriptionIn the battlefield , an effective way to defeat enemies is to break their communication system.The information department told 阅读全文
posted @ 2013-05-21 14:22 Jack Ge 阅读(905) 评论(1) 推荐(0) 编辑
摘要:GeoDefenseTime Limit: 12000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 414Accepted Submission(s): 173Problem DescriptionTower defense is a kind of real-time strategy computer games. The goal of tower defense games is to try to stop enemies from reaching your b 阅读全文
posted @ 2013-05-21 13:57 Jack Ge 阅读(156) 评论(0) 推荐(0) 编辑
摘要:Find Metal MineralTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 1744Accepted Submission(s): 774Problem DescriptionHumans have discovered a kind of new metal mineral on Mars which are distributed in point‐like with paths connecting each of them wh 阅读全文
posted @ 2013-05-21 12:42 Jack Ge 阅读(194) 评论(0) 推荐(0) 编辑
摘要:The more, The BetterTime Limit: 6000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3784Accepted Submission(s): 2230Problem DescriptionACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中ACboy允许攻克M个城堡并获得里面的宝物。但由于地理位置原因,有些城堡不能直接攻克,要攻克这些城堡必须先攻克其他某一个特定的城堡。你能帮ACboy算出要获得尽量多 阅读全文
posted @ 2013-05-21 12:09 Jack Ge 阅读(377) 评论(0) 推荐(0) 编辑
摘要:Strategic GameTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3580Accepted Submission(s): 1573Problem DescriptionBob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he is v 阅读全文
posted @ 2013-05-21 11:46 Jack Ge 阅读(513) 评论(0) 推荐(0) 编辑
摘要:Anniversary partyTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2668Accepted Submission(s): 1192Problem DescriptionThere is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical stru 阅读全文
posted @ 2013-05-21 10:10 Jack Ge 阅读(239) 评论(0) 推荐(0) 编辑
摘要:Stern-Brocot TreeTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 251Accepted Submission(s): 159Problem Description 上图是一棵Stern-Brocot树,其生成规则如下: 从第1行到第n行,每行相邻两数a/b和c/d,产生中间数(a+c)/(b+d),置于下一行中。将一行的分数(包括0/1,1/0),进行约分简化,则每一行(包括0/1,1/0,1/1),不会出现两个相... 阅读全文
posted @ 2013-05-21 09:26 Jack Ge 阅读(1436) 评论(0) 推荐(0) 编辑
摘要:原文地址链接: http://blog.sina.com.cn/s/blog_5e32cc130100fszx.html2, 【用Python写爬虫】获取html的方法【二】:使用pycurl# Pycurl参考地址:http://pycurl.sourceforge.net/# Pycurl下载地址:http://pycurl.sourceforge.net/download/pycurl-7.18.1.tar.gz#!/usr/bin/python#coding:utf8import pycurlimport StringIOdef getURLContent_pycurl(url): . 阅读全文
posted @ 2013-05-20 19:32 Jack Ge 阅读(501) 评论(0) 推荐(0) 编辑
摘要:把github上的help略略翻译一遍。备忘。First : 安装:ubuntu 下,终端输入命令:sudo apt-get install git-core git-gui git-docNext : 设置SSH Key检查是否已经有SSH Key。$cd ~/.ssh如果说没有这个目录,就直接看第三步备份生成一个新的SSH。$ssh-keygen -t rsa -C "email"之后直接回车,不用填写东西。之后会让你输入密码。然后就生成一个目录.ssh ,里面有两个文件:id_rsa , id_rsa.pub把这个SSH放到github上。用公钥。先在GitHub上注 阅读全文
posted @ 2013-05-20 06:57 Jack Ge 阅读(206) 评论(0) 推荐(0) 编辑
摘要:美素数Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 374Accepted Submission(s): 159Problem Description 小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识。 问题是这样的:一个十进制数,如果是素数,而且它的各位数字和也是素数,则称之为“美素数”,如29,本身是素数,而且2+9 = 11也是素数,所以它是美素数。 给定一个区间,你能计算出这个区间内有... 阅读全文
posted @ 2013-05-19 22:03 Jack Ge 阅读(677) 评论(0) 推荐(0) 编辑
摘要:具体介绍看链接: http://www.linuxidc.com/Linux/2011-08/40792.htm使用Eclipse编辑文件经常出现中文乱码或者文件中有中文不能保存的问题,Eclipse提供了灵活的设置文件编码格式的选项,我们可以通过设置编码 格式解决乱码问题。在Eclipse可以从几个层面设置编码格式:Workspace、Project、Content Type、File 本文以Eclipse 3.3(英文)为例加以说明: 1. 设置Workspace的编码格式: Windows->Preferences... 打开"首选项"窗口,点击左侧导航树到Ge 阅读全文
posted @ 2013-05-19 16:39 Jack Ge 阅读(4043) 评论(0) 推荐(1) 编辑
摘要:1737 - Play the Dicehttp://icpc.njust.edu.cn/Local/1737时间限制:2000 MS内存限制:65535 MB问题描述There is a dice withN sides, which are numbered from 1,2,...,n and have the equal possibility to show up when one rolls a dice. Each side has an integer Aion it. Now here is a game that you can roll this dice once, i 阅读全文
posted @ 2013-05-19 10:39 Jack Ge 阅读(523) 评论(0) 推荐(0) 编辑
摘要:Trees Made to OrderTime Limit:1000MSMemory Limit:10000KTotal Submissions:6290Accepted:3619DescriptionWe can number binary trees using the following scheme:The empty tree is numbered 0.The single-node tree is numbered 1.All binary trees having m nodes have numbers less than all those having m+1 nodes 阅读全文
posted @ 2013-05-19 09:39 Jack Ge 阅读(1990) 评论(0) 推荐(0) 编辑
摘要:卡特兰数关于扩展的卡特兰数:1.(n-m+1)/(n+1)*c(n+m,n)2.c[n+m][n]-c[n+m][m-1]Catalan,Eugene,Charles,卡特兰(1814~1894)比利时数学家,生于布鲁日(Brugge),早年在巴黎综合工科学校就读。1856年任列日(Liege)大学数学教授,并被选为比利时布鲁塞尔科学院院士。卡特兰一生共发表200多种数学各领域的论著。在微分几何中,他证明了下述所谓的卡特兰定理:当一个直纹曲线是平面和一般的螺旋面时,他只能是实的极小曲面。他还和雅可比(Jacobi,C·G·J)同时解决了多重积分的变量替换问题,建立了有关的公 阅读全文
posted @ 2013-05-19 09:27 Jack Ge 阅读(5547) 评论(0) 推荐(3) 编辑
摘要:Bag ProblemTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/131072 K (Java/Others)Total Submission(s): 1011Accepted Submission(s): 308Problem Description0/1 bag problem should sound familiar to everybody. Every earth man knows it well. Here is a mutant: given the capacity of a bag, that is 阅读全文
posted @ 2013-05-19 09:04 Jack Ge 阅读(352) 评论(0) 推荐(0) 编辑
摘要:比赛难度Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 330Accepted Submission(s): 83Problem Description 最近,小明出了一些ACM编程题,决定在HDOJ举行一场公开赛。 假设题目的数量一共是n道,这些题目的难度被评级为一个不超过1000的非负整数,并且一场比赛至少需要一个题,而这场比赛的难度,就是所有题目的难度之和,同时,我们认为一场比赛与本场题目的顺序无关,而且题目也不会重复。 显而易见,... 阅读全文
posted @ 2013-05-19 00:24 Jack Ge 阅读(414) 评论(0) 推荐(0) 编辑
摘要:魔法串Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 427Accepted Submission(s): 174Problem Description 小明和他的好朋友小西在玩一个新的游戏,由小西给出一个由小写字母构成的字符串,小明给出另一个比小西更长的字符串,也由小写字母组成,如果能通过魔法转换使小明的串和小西的变成同一个,那么他们两个人都会很开心。这里魔法指的是小明的串可以任意删掉某个字符,或者把某些字符对照字符变化表变化。如: ... 阅读全文
posted @ 2013-05-19 00:22 Jack Ge 阅读(238) 评论(0) 推荐(0) 编辑
摘要:Greatest NumberTime Limit: 1000MS Memory limit: 65536K题目描述 Saya likes math, because she think math can make her cleverer. One day, Kudo invited a very simple game: GivenNintegers, then the players choose no more than four integers from them (can be repeated) and add them together. Finally, the one.. 阅读全文
posted @ 2013-05-18 16:53 Jack Ge 阅读(588) 评论(0) 推荐(0) 编辑
摘要:Pick applesTime Limit: 1000ms Memory limit: 165536K有疑问?点这里^_^题目描述Once ago, there is a mystery yard which only produces three kinds of apples. The number of each kind is infinite. A girl carrying a big bag comes into the yard. She is so surprised because she has never seen so many apples before. Each 阅读全文
posted @ 2013-05-17 18:10 Jack Ge 阅读(586) 评论(0) 推荐(0) 编辑
摘要:吉哥系列故事——完美队形ITime Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1302Accepted Submission(s): 360Problem Description 吉哥这几天对队形比较感兴趣。 有一天,有n个人按顺序站在他的面前,他们的身高分别是h[1], h[2] ... h[n],吉哥希望从中挑出一些人,让这些人形成一个新的队形,新的队形若满足以下三点要求,则称之为完美队形: 1、挑出的人保持他们在原队形的相对顺序不变... 阅读全文
posted @ 2013-05-16 14:29 Jack Ge 阅读(1276) 评论(0) 推荐(0) 编辑
摘要:1, HDU 2089 不要62 :http://acm.hdu.edu.cn/showproblem.php?pid=2089题意:不能出现4,或者相邻的62, dp[i][0],表示不存在不吉利数字 dp[i][1],表示不存在不吉利数字,且最高位为2 dp[i][2],表示存在不吉利数字#include<iostream>#include<cstdio>#include<cstring>using namespace std;int dp[10][3];void Init(){ //预处理,算出所有可能 memset(dp,0,sizeof(dp)); 阅读全文
posted @ 2013-05-15 23:32 Jack Ge 阅读(5880) 评论(0) 推荐(1) 编辑
摘要:小明系列故事——师兄帮帮忙Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 2722Accepted Submission(s): 686Problem Description 小明自从告别了ACM/ICPC之后,就开始潜心研究数学问题了,一则可以为接下来的考研做准备,再者可以借此机会帮助一些同学,尤其是漂亮的师妹。这不,班里唯一的女生又拿一道数学题来请教小明,小明当然很高兴的就接受了。不过等他仔细读题以后,发现自己也不会做,这下小明囧了:如果. 阅读全文
posted @ 2013-05-15 19:03 Jack Ge 阅读(351) 评论(0) 推荐(0) 编辑
摘要:湫湫系列故事——植树节Time Limit: 1000/500 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 694Accepted Submission(s): 409Problem Description 今天是一年一度的植树节,腾讯幼儿园要求每个老师在班里选出几个小朋友一起去野外种植小树苗,根据学校的整体安排,湫湫老师的班里要选出3个小朋友。已知湫湫的班里共有n个孩子,每个孩子有Bi个朋友(i从1到n),且朋友关系是相互的,如果a小朋友和b小朋友是朋友,那么b小朋友和a小朋友也. 阅读全文
posted @ 2013-05-15 17:05 Jack Ge 阅读(432) 评论(0) 推荐(0) 编辑
摘要:吉哥系列故事——临时工计划Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1882Accepted Submission(s): 695Problem Description 俗话说一分钱难倒英雄汉,高中几年下来,吉哥已经深深明白了这个道理,因此,新年开始存储一年的个人资金已经成了习惯,不过自从大学之后他不好意思再向大人要压岁钱了,只能把唯一的希望放到自己身上。可是由于时间段的特殊性和自己能力的因素,只能找到些零零碎碎的工作,吉哥想知道怎么安. 阅读全文
posted @ 2013-05-15 16:53 Jack Ge 阅读(359) 评论(0) 推荐(0) 编辑
摘要:小明系列故事——买年货Time Limit: 5000/2000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1479Accepted Submission(s): 636Problem Description 春节将至,小明要去超市购置年货,于是小明去了自己经常去的都尚超市。 刚到超市,小明就发现超市门口聚集一堆人。用白云女士的话说就是:“那家伙,那场面,真是人山人海,锣鼓喧天,鞭炮齐呤,红旗招展。那可真是相当的壮观啊!”。好奇的小明走过去,奋力挤过人群,发现超市门口贴了一张通.. 阅读全文
posted @ 2013-05-15 16:29 Jack Ge 阅读(384) 评论(0) 推荐(0) 编辑
摘要:HDU 3001 travelling:http://acm.hdu.edu.cn/showproblem.php?pid=3001注意题目叙述:“But Mr Acmer gets bored so easily that he doesn't want to visit a city more than twice!”, 题目大意:加限制的最小生成树,限制条件:每个节点最多只能到达两次, 用三进制(想想二进制表示的意思,可对比理解)#include<iostream>#include<cstdio>#include<cstring>#includ 阅读全文
posted @ 2013-05-14 17:01 Jack Ge 阅读(284) 评论(0) 推荐(0) 编辑
摘要:转自(http://coolshell.cn/articles/4990.html)月光博客6月12日发表了《写给新手程序员的一封信》,翻译自《An open letter to those who want to start programming》,我的朋友(他在本站的id是Mailper)告诉我,他希望在酷壳上看到一篇更具操作性的文章。因为他也是喜欢编程和技术的家伙,于是,我让他把他的一些学习Python和Web编程的一些点滴总结一下。于是他给我发来了一些他的心得和经历,我在把他的心得做了不多的增改,并根据我的经历增加了“进阶”一节。这是一篇由新手和我这个老家伙根据我们的经历完成的文章。 阅读全文
posted @ 2013-05-14 14:25 Jack Ge 阅读(325) 评论(0) 推荐(1) 编辑
摘要:The Bottom of a GraphTime Limit:3000MSMemory Limit:65536KTotal Submissions:7514Accepted:3083DescriptionWe will use the following (standard) definitions from graph theory. LetVbe a nonempty and finite set, its elements being called vertices (or nodes). LetEbe a subset of the Cartesian productV×V 阅读全文
posted @ 2013-05-14 12:08 Jack Ge 阅读(411) 评论(0) 推荐(0) 编辑
摘要:Frogs' NeighborhoodTime Limit:5000MSMemory Limit:10000KTotal Submissions:5819Accepted:2498Special JudgeDescription未名湖附近共有N个大小湖泊L1,L2, ...,Ln(其中包括未名湖),每个湖泊Li里住着一只青蛙Fi(1 ≤i≤N)。如果湖泊Li和Lj之间有水路相连,则青蛙Fi和Fj互称为邻居。现在已知每只青蛙的邻居数目x1,x2, ...,xn,请你给出每两个湖泊之间的相连关系。Input第一行是测试数据的组数T(0 ≤T≤ 20)。每组数据包括两行,第一行是整数N(2 阅读全文
posted @ 2013-05-13 23:17 Jack Ge 阅读(301) 评论(0) 推荐(0) 编辑
摘要:当我配置完Java环境变量后,使用java-version时,发现出现了以下错误然后经过查找资料找到了解决方法,可是原因不明,详见:http://blog.csdn.net/wzju64676266/article/details/5288218出现error:could not open '...jvm.cfg'大多是安装jdk的时候在注册表里注册过,在网上看到很多关于error:could not open '...jvm.cfg'的问题的解决方法,但有些无效,有些比较复杂,最简单的一招是删除"c:/windows/java.exe",w 阅读全文
posted @ 2013-05-13 18:54 Jack Ge 阅读(1470) 评论(0) 推荐(0) 编辑
摘要:Slim SpanTime Limit:5000MSMemory Limit:65536KTotal Submissions:5362Accepted:2813DescriptionGiven an undirected weighted graphG, you should find one of spanning trees specified as follows.The graphGis an ordered pair (V,E), whereVis a set of vertices {v1,v2, …,vn} andEis a set of undirected edges {e1 阅读全文
posted @ 2013-05-13 15:01 Jack Ge 阅读(1256) 评论(0) 推荐(0) 编辑
摘要:Command NetworkTime Limit:1000MSMemory Limit:131072KTotal Submissions:10136Accepted:2946DescriptionAfter a long lasting war on words, a war on arms finally breaks out between littleken’s and KnuthOcean’s kingdoms. A sudden and violent assault by KnuthOcean’s force has rendered a total failure of lit 阅读全文
posted @ 2013-05-13 14:41 Jack Ge 阅读(272) 评论(0) 推荐(0) 编辑
摘要:Desert KingTime Limit:3000MSMemory Limit:65536KTotal Submissions:17772Accepted:5011DescriptionDavid the Great has just become the king of a desert country. To win the respect of his people, he decided to build channels all over his country to bring water to every village. Villages which are connecte 阅读全文
posted @ 2013-05-12 10:37 Jack Ge 阅读(754) 评论(0) 推荐(0) 编辑
摘要:Picnic PlanningTime Limit:5000MSMemory Limit:10000KTotal Submissions:8340Accepted:2946DescriptionThe Contortion Brothers are a famous set of circus clowns, known worldwide for their incredible ability to cram an unlimited number of themselves into even the smallest vehicle. During the off-season, th 阅读全文
posted @ 2013-05-12 08:18 Jack Ge 阅读(1754) 评论(0) 推荐(0) 编辑
摘要:Full Tank?Time Limit:1000MSMemory Limit:65536KTotal Submissions:5619Accepted:1836DescriptionAfter going through the receipts from your car trip through Europe this summer, you realised that the gas prices varied between the cities you visited. Maybe you could have saved some money if you were a bit 阅读全文
posted @ 2013-05-11 11:37 Jack Ge 阅读(363) 评论(0) 推荐(0) 编辑
摘要:Sightseeing CowsTime Limit:1000MSMemory Limit:65536KTotal Submissions:6684Accepted:2196DescriptionFarmer John has decided to reward his cows for their hard work by taking them on a tour of the big city! The cows must decide how best to spend their free time.Fortunately, they have a detailed city map 阅读全文
posted @ 2013-05-11 10:41 Jack Ge 阅读(994) 评论(0) 推荐(0) 编辑
摘要:Cow RelaysTime Limit:1000MSMemory Limit:65536KTotal Submissions:4395Accepted:1748DescriptionFor their physical fitness program,N(2 ≤N≤ 1,000,000) cows have decided to run a relay race using theT(2 ≤T≤ 100) cow trails throughout the pasture.Each trail connects two different intersections (1 ≤I1i≤ 1,0 阅读全文
posted @ 2013-05-11 09:25 Jack Ge 阅读(499) 评论(0) 推荐(0) 编辑
摘要:Closest Common AncestorsTime Limit:2000MSMemory Limit:10000KTotal Submissions:12745Accepted:4162DescriptionWrite a program that takes as input a rooted tree and a list of pairs of vertices. For each pair (u,v) the program determines the closest common ancestor of u and v in the tree. The closest com 阅读全文
posted @ 2013-05-10 16:32 Jack Ge 阅读(1322) 评论(2) 推荐(2) 编辑
摘要:Nearest Common AncestorsTime Limit:1000MSMemory Limit:10000KTotal Submissions:13981Accepted:7454DescriptionA rooted tree is a well-known data structure in computer science and engineering. An example is shown below:In the figure, each node is labeled with an integer from {1, 2,...,16}. Node 8 is the 阅读全文
posted @ 2013-05-10 15:02 Jack Ge 阅读(252) 评论(0) 推荐(0) 编辑
摘要:Pushing BoxesTime Limit:2000MSMemory Limit:131072KTotal Submissions:3943Accepted:1394Special JudgeDescriptionImagine you are standing inside a two-dimensional maze composed of square cells which may or may not be filled with rock. You can move north, south, east or west one cell at a step. These mov 阅读全文
posted @ 2013-05-10 09:23 Jack Ge 阅读(299) 评论(0) 推荐(0) 编辑
摘要:As long as Binbin loves SangsangTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1601Accepted Submission(s): 429Problem DescriptionBinbin misses Sangsang so much. He wants to meet with Sangsang as soon as possible.Now Binbin downloads a map from ELG 阅读全文
posted @ 2013-05-09 15:14 Jack Ge 阅读(247) 评论(0) 推荐(0) 编辑
摘要:IntervalsTime Limit:2000MSMemory Limit:65536KTotal Submissions:18740Accepted:7042DescriptionYou are given n closed, integer intervals [ai, bi] and n integers c1, ..., cn.Write a program that:reads the number of intervals, their end points and integers c1, ..., cn from the standard input,computes the 阅读全文
posted @ 2013-05-06 07:43 Jack Ge 阅读(200) 评论(0) 推荐(0) 编辑
摘要:网络流题目集锦(转)最大流POJ 1273 Drainage DitchesPOJ 1274 The Perfect Stall (二分图匹配)POJ 1698 Alice's ChancePOJ 1459 Power NetworkPOJ 2112 Optimal Milking (二分)POJ 2455 Secret Milking Machine (二分)POJ 3189 Steady Cow Assignment (枚举)POJ 1637 Sightseeing tour (混合图欧拉回路)POJ 3498 March of the Penguins (枚举汇点)POJ 108 阅读全文
posted @ 2013-05-06 07:42 Jack Ge 阅读(224) 评论(0) 推荐(0) 编辑
摘要:CandiesTime Limit:1500MSMemory Limit:131072KTotal Submissions:19891Accepted:5241DescriptionDuring the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse’s class a large bag of candies and had flymouse distribute them. All the kids lov 阅读全文
posted @ 2013-05-06 07:40 Jack Ge 阅读(368) 评论(0) 推荐(0) 编辑
摘要:LayoutTime Limit:1000MSMemory Limit:65536KTotal Submissions:5190Accepted:2491DescriptionLike everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 <= N <= 1,000) cows numbered 1..N standing along a straight line waiting for feed. The cows are standing in t 阅读全文
posted @ 2013-05-06 07:37 Jack Ge 阅读(553) 评论(0) 推荐(0) 编辑
摘要:找了好久终于在这个牛这里找到为什么反向边要加回流量的原因了,因为是初学教程,所以我会尽量避免繁杂的数学公式和证明。也尽量给出了较为完整的代码。本文的目标群体是网络流的初学者,尤其是看了各种NB的教程也没看懂怎么求最大流的小盆友们。本文的目的是,解释基本的网络流模型,最基础的最大流求法,即bfs找增广路法,也就是EK法,全名是Edmond-Karp,其实我倒是觉得记一下算法的全名和来历可以不时的拿出来装一装。 比如说这个,EK算法首先由俄罗斯科学家Dinic在1970年提出,没错,就是dinic算法的创始人,实际上他提出的也正是dinic算法,在EK的基础上加入了层次优化,这个我们以后再说,19 阅读全文
posted @ 2013-05-05 23:23 Jack Ge 阅读(7435) 评论(0) 推荐(1) 编辑
摘要:KingTime Limit:1000MSMemory Limit:10000KTotal Submissions:8534Accepted:3221DescriptionOnce, in one kingdom, there was a queen and that queen was expecting a baby. The queen prayed: ``If my child was a son and if only he was a sound king.'' After nine months her child was born, and indeed, sh 阅读全文
posted @ 2013-05-05 23:18 Jack Ge 阅读(247) 评论(0) 推荐(0) 编辑
摘要:Flow ProblemTime Limit: 5000/5000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 4865Accepted Submission(s): 2275Problem DescriptionNetwork flow is a well-known difficult problem for ACMers. Given a graph, your task is to find out the maximum flow for the weighted dire 阅读全文
posted @ 2013-05-05 22:53 Jack Ge 阅读(451) 评论(0) 推荐(0) 编辑
摘要:Minimum CutTime Limit:10000MSMemory Limit:65536KTotal Submissions:6403Accepted:2663Case Time Limit:5000MSDescriptionGiven an undirected graph, in which two vertices can be connected by multiple edges, what is the size of the minimum cut of the graph? i.e. how many edges must be removed at least to d 阅读全文
posted @ 2013-05-05 22:12 Jack Ge 阅读(575) 评论(0) 推荐(0) 编辑
摘要:1461.致命游戏http://acm.xmu.edu.cn/JudgeOnline/problem.php?id=1461Time Limit: 3000 MSMemory Limit: 65536 KTotal Submissions: 84 (53 users)Accepted: 35 (35 users)[My Solution]Description 程序员Alice和Bob摊上大事了,被判了死刑。恰巧这天遇上“网宿科技杯”厦门大学第四届程序设计积分赛,于是主办方决定大赦其中一个人的刑罚。 主办方开发了一个游戏:有一个n*m大小的矩形格子阵列,左下角为(1, 1)格子,放了瓶毒药。A 阅读全文
posted @ 2013-05-04 19:35 Jack Ge 阅读(319) 评论(0) 推荐(0) 编辑
摘要:Computer Virus on Planet PandoraTime Limit : 6000/2000ms (Java/Other)Memory Limit : 256000/128000K (Java/Other)Total Submission(s) : 12Accepted Submission(s) : 5Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionAliens on planet Pandora also write computer programs like us. Their pro 阅读全文
posted @ 2013-05-04 08:32 Jack Ge 阅读(671) 评论(0) 推荐(0) 编辑
摘要:Dual Core CPUTime Limit:15000MSMemory Limit:131072KTotal Submissions:15782Accepted:6813Case Time Limit:5000MSDescriptionAs more and more computers are equipped with dual core CPU, SetagLilb, the Chief Technology Officer of TinySoft Corporation, decided to update their famous product - SWODNIW.The ro 阅读全文
posted @ 2013-05-03 23:29 Jack Ge 阅读(397) 评论(0) 推荐(0) 编辑
摘要:二分图的定义:二分图是这样一个图,它的顶点可以分类两个集合X和Y,所有的边关联在两个顶点中,恰好一个属于集合X,另一个属于集合Y。未盖点 :设Vi是图G的一个顶点,如果Vi 不与任意一条属于匹配M的边相关联,就称Vi 是一个未盖点。交错路:设P是图G的一条路,如果P的任意两条相邻的边一定是一条属于M而另一条不属于M,就称P是一条交错路。可增广路:两个端点都是未盖点的交错路叫做可增广路。最大匹配:图中包含边数最多的匹配称为图的最大匹配。完美匹配: 如果所有点都在匹配边上,称这个最大匹配是完美匹配。最小覆盖:在一个二分图上用最少的点(x 或 y 集合的都行),让每条连接两个点集的边都至少和其中一个 阅读全文
posted @ 2013-05-03 22:55 Jack Ge 阅读(359) 评论(0) 推荐(0) 编辑
摘要:Antenna PlacementTime Limit:1000MSMemory Limit:65536KTotal Submissions:5302Accepted:2645DescriptionThe Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile phone nets in Sweden. The most striking reason why they got the job, is their discovery of a new, 阅读全文
posted @ 2013-05-03 22:46 Jack Ge 阅读(160) 评论(0) 推荐(0) 编辑
摘要:DNA repairTime Limit : 5000/2000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 2Accepted Submission(s) : 2Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionBiologists finally invent techniques of repairing DNA that contains segments causing kinds of inh 阅读全文
posted @ 2013-05-03 21:25 Jack Ge 阅读(541) 评论(0) 推荐(0) 编辑
摘要:Muddy FieldsTime Limit:1000MSMemory Limit:65536KTotal Submissions:6798Accepted:2506DescriptionRain has pummeled the cows' field, a rectangular grid of R rows and C columns (1 #include#includeusing namespace std;int n,m,cnt1,cnt2,map[2520][2520],linker[2520],vis[2520];int g1[60][60],g2[60][60],tg 阅读全文
posted @ 2013-05-03 18:38 Jack Ge 阅读(332) 评论(0) 推荐(0) 编辑
摘要:奔小康赚大钱Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1836Accepted Submission(s): 798Problem Description传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子。这可是一件大事,关系到人民的住房问题啊。村里共有n间房间,刚好有n家老百姓,考虑到每家都要有房住(如果有老百姓没房子住的话,容易引起不安定因素),每家必须分配到一间房子且只能得到一间房子。另一方面,村长和另 阅读全文
posted @ 2013-05-03 17:12 Jack Ge 阅读(3970) 评论(0) 推荐(1) 编辑
摘要:Selecting CoursesTime Limit:1000MSMemory Limit:65536KTotal Submissions:7635Accepted:3367DescriptionIt is well known that it is not easy to select courses in the college, for there is usually conflict among the time of the courses. Li Ming is a student who loves study every much, and at the beginning 阅读全文
posted @ 2013-05-03 16:44 Jack Ge 阅读(333) 评论(0) 推荐(0) 编辑
摘要:Invitation CardsTime Limit:8000MSMemory Limit:262144KTotal Submissions:15889Accepted:5159DescriptionIn the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate theater and, most of all, Antique Comedies. They 阅读全文
posted @ 2013-05-03 16:33 Jack Ge 阅读(216) 评论(0) 推荐(0) 编辑
摘要:Treasure ExplorationTime Limit:6000MSMemory Limit:65536KTotal Submissions:5875Accepted:2343DescriptionHave you ever read any book about treasure exploration? Have you ever see any film about treasure exploration? Have you ever explored treasure? If you never have such experiences, you would never kn 阅读全文
posted @ 2013-05-03 13:13 Jack Ge 阅读(241) 评论(0) 推荐(0) 编辑
摘要:Popular CowsTime Limit:2000MSMemory Limit:65536KTotal Submissions:19083Accepted:7675DescriptionEvery cow's dream is to become the most popular cow in the herd. In a herd of N (1 <= N <= 10,000) cows, you are given up to M (1 <= M <= 50,000) ordered pairs of the form (A, B) that tell 阅读全文
posted @ 2013-05-03 12:58 Jack Ge 阅读(1126) 评论(0) 推荐(0) 编辑
摘要:Intelligence SystemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 901Accepted Submission(s): 401Problem DescriptionAfter a day, ALPCs finally complete their ultimate intelligence system, the purpose of it is of course for ACM ... ...Now, kzc_tc, t 阅读全文
posted @ 2013-05-03 12:40 Jack Ge 阅读(295) 评论(0) 推荐(0) 编辑
摘要:Buy the TicketTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3286Accepted Submission(s): 1366Problem DescriptionThe "Harry Potter and the Goblet of Fire" will be on show in the next few days. As a crazy fan of Harry Potter, you will go t 阅读全文
posted @ 2013-05-02 22:37 Jack Ge 阅读(219) 评论(0) 推荐(0) 编辑
摘要:Father Christmas flymouseTime Limit:1000MSMemory Limit:131072KTotal Submissions:1999Accepted:674DescriptionAfter retirement as contestant from WHU ACM Team, flymouse volunteered to do the odds and ends such as cleaning out the computer lab for training as extension of his contribution to the team. W 阅读全文
posted @ 2013-05-02 07:45 Jack Ge 阅读(324) 评论(0) 推荐(0) 编辑
摘要:Going from u to v or from v to u?Time Limit:2000MSMemory Limit:65536KTotal Submissions:12260Accepted:3139DescriptionIn order to make their sons brave, Jiajia and Wind take them to a big cave. The cave has n rooms, and one-way corridors connecting some rooms. Each time, Wind choose two rooms x and y, 阅读全文
posted @ 2013-05-02 07:10 Jack Ge 阅读(340) 评论(0) 推荐(0) 编辑
摘要:RoadblocksTime Limit:2000MSMemory Limit:65536KTotal Submissions:5256Accepted:2013DescriptionBessie has moved to a small farm and sometimes enjoys returning to visit one of her best friends. She does not want to get to her old home too quickly, because she likes the scenery along the way. She has dec 阅读全文
posted @ 2013-05-01 23:11 Jack Ge 阅读(375) 评论(0) 推荐(0) 编辑
摘要:1.定义:割点:某个点是割点当且仅当删除该点和与该点相关联的边后图变得不连通。桥(割边):某条边是割边当且仅当删除该边后图变的不连通。双连通分支:图G的所有子图G'中,如果G'是连通的,则称G'是双连通子图。如果G'不是任何一个连通子图的真子图,那么图G'是双连通分支。特别的,点双连通分支又叫做块。2.求割点,桥对原图进行深度优先搜索,会生成一颗深度优先搜索生成树。定义dfs[u]为u在深度优先搜索生成树中被遍历到的序号,low[u]为u或者他的子树中可以通过非父子边追溯到的最早结点。那么一个顶点是割点,满足下列条件之一:1).u是树根,u有两个或两个以 阅读全文
posted @ 2013-05-01 22:41 Jack Ge 阅读(452) 评论(0) 推荐(0) 编辑
摘要:NetworkTime Limit:1000MSMemory Limit:10000KTotal Submissions:7510Accepted:3525DescriptionA Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting several places numbered by integers from 1 to N . No two places have the same number. The lines are bidirectional 阅读全文
posted @ 2013-05-01 22:36 Jack Ge 阅读(2728) 评论(0) 推荐(0) 编辑
摘要:Redundant PathsTime Limit:1000MSMemory Limit:65536KTotal Submissions:6982Accepted:3042DescriptionIn order to get from one of the F (1 <= F <= 5,000) grazing fields (which are numbered 1..F) to another field, Bessie and the rest of the herd are forced to cross near the Tree of Rotten Apples. Th 阅读全文
posted @ 2013-05-01 22:21 Jack Ge 阅读(474) 评论(0) 推荐(0) 编辑
摘要:ElectricityTime Limit:5000MSMemory Limit:65536KTotal Submissions:2515Accepted:839DescriptionBlackouts and Dark Nights (also known as ACM++) is a company that provides electricity. The company owns several power plants, each of them supplying a small area that surrounds it. This organization brings a 阅读全文
posted @ 2013-05-01 22:06 Jack Ge 阅读(596) 评论(0) 推荐(0) 编辑
摘要:King Arthur's KnightsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1358Accepted Submission(s): 583Special JudgeProblem DescriptionI am the bone of my sword. Steel is my body, and the fire is my blood.- from Fate / Stay NightYou must have know 阅读全文
posted @ 2013-05-01 21:48 Jack Ge 阅读(349) 评论(0) 推荐(0) 编辑
摘要:Problem F: [USACO 3.1.6]邮票http://www.acmore.net/problem.php?id=1084Time Limit:1 SecMemory Limit:64 MBSubmit:35Solved:13SubmitStatusWeb BoardDescription已知一个 N 枚邮票的面值集合(如,{1 分,3 分})和一个上限 K —— 表示信封上能够贴 K 张邮票。计算从 1 到 M 的最大连续可贴出的邮资。 例如,假设有 1 分和 3 分的邮票;你最多可以贴 5 张邮票。很容易贴出 1 到 5 分的邮资(用 1 分邮票贴就行了),接下来的邮资也不难: 阅读全文
posted @ 2013-05-01 19:08 Jack Ge 阅读(203) 评论(0) 推荐(0) 编辑
摘要:Problem H: [USACO 2.3.4]货币系统http://www.acmore.net/problem.php?cid=1012&pid=7Time Limit:1 SecMemory Limit:64 MBSubmit:42Solved:23SubmitStatusWeb BoardDescription母牛们不但创建了他们自己的政府而且选择了建立了自己的货币系统。 [In their own rebellious way],,他们对货币的数值感到好奇。传统地,一个货币系统是由1,5,10,20 或 25,50, 和 100的单位面值组成的。母牛想知道有多少种不同的方法来 阅读全文
posted @ 2013-05-01 18:50 Jack Ge 阅读(1288) 评论(0) 推荐(0) 编辑
摘要:Big Christmas TreeTime Limit:3000MSMemory Limit:131072KTotal Submissions:18303Accepted:3881DescriptionChristmas is coming to KCM city. Suby the loyal civilian in KCM city is preparing a big neat Christmas tree. The simple structure of the tree is shown in right picture.The tree can be represented as 阅读全文
posted @ 2013-05-01 18:22 Jack Ge 阅读(472) 评论(0) 推荐(0) 编辑
摘要:Fiber NetworkTime Limit:1000MSMemory Limit:65536KTotal Submissions:2660Accepted:1221DescriptionSeveral startup companies have decided to build a better Internet, called the "FiberNet". They have already installed many nodes that act as routers all around the world. Unfortunately, they star 阅读全文
posted @ 2013-05-01 15:58 Jack Ge 阅读(450) 评论(0) 推荐(0) 编辑
摘要:Play on WordsTime Limit:1000MSMemory Limit:10000KTotal Submissions:7970Accepted:2802DescriptionSome of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because there is no other way to open the doors, the puzzle is very important 阅读全文
posted @ 2013-05-01 15:42 Jack Ge 阅读(616) 评论(1) 推荐(0) 编辑
摘要:The Unique MSTTime Limit:1000MSMemory Limit:10000KTotal Submissions:16690Accepted:5782DescriptionGiven a connected undirected graph, tell if its minimum spanning tree is unique.Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of G is a subgraph of G, s 阅读全文
posted @ 2013-05-01 15:05 Jack Ge 阅读(505) 评论(0) 推荐(0) 编辑
摘要:Optimal MilkingTime Limit:2000MSMemory Limit:30000KTotal Submissions:9498Accepted:3433Case Time Limit:1000MSDescriptionFJ has moved his K (1 <= K <= 30) milking machines out into the cow pastures among the C (1 <= C <= 200) cows. A set of paths of various lengths runs among the cows and 阅读全文
posted @ 2013-05-01 14:49 Jack Ge 阅读(362) 评论(0) 推荐(0) 编辑
摘要:1508: ZZ’s Fibonacci Problemhttp://www.acmore.net/problem.php?id=1508Time Limit:1 SecMemory Limit:64 MBSubmit:67Solved:14SubmitStatusWeb BoardDescription ZZ is a big fan of Fibonacci numbers, and she pays lots of attention on Fibonacci numbers, Fibonacci numbers have the following form: F(1) = 1, .. 阅读全文
posted @ 2013-05-01 13:36 Jack Ge 阅读(353) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示