上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 28 下一页
摘要: Catch That CowTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 29149Accepted: 8967DescriptionFarmer 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-05-07 17:00 w0w0 阅读(168) 评论(0) 推荐(0)
摘要: Knight MovesTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 8049Accepted: 4678DescriptionA friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessboard 阅读全文
posted @ 2012-05-07 15:41 w0w0 阅读(165) 评论(0) 推荐(0)
摘要: 迷宫问题Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4323Accepted: 2476Description定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。Input一个5 × 5的二维数组,表示一个迷宫。数据保证有唯一解。Out 阅读全文
posted @ 2012-05-07 14:45 w0w0 阅读(204) 评论(0) 推荐(0)
摘要: Largest Submatrix of All 1’sTime Limit: 5000MSMemory Limit: 131072KTotal Submissions: 3964Accepted: 1476Case Time Limit: 2000MSDescriptionGiven a m-by-n (0,1)-matrix, of all its submatrices of all 1’s which is the largest? By largest we mean that the submatrix has the most elements.InputThe input co 阅读全文
posted @ 2012-05-05 16:37 w0w0 阅读(204) 评论(0) 推荐(0)
摘要: Bad Hair DayTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 10031Accepted: 3326DescriptionSome of Farmer John's N cows (1 ≤ N ≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hairstyle, FJ wants to count the number of other cows that can see the top 阅读全文
posted @ 2012-05-05 16:23 w0w0 阅读(209) 评论(0) 推荐(0)
摘要: Feel GoodTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 7422Accepted: 1983Case Time Limit: 1000MSSpecial JudgeDescriptionBill is developing a new mathematical theory for human emotions. His recent investigations are dedicated to studying how good or bad days influent people's memories 阅读全文
posted @ 2012-05-05 15:38 w0w0 阅读(163) 评论(0) 推荐(0)
摘要: Terrible SetsTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 2335Accepted: 1157DescriptionLet N be the set of all natural numbers {0 , 1 , 2 , . . . }, and R be the set of all real numbers. wi, hi for i = 1 . . . n are some elements in N, and w0 = 0. Define set B = {< x, y > | x, y ∈ 阅读全文
posted @ 2012-05-05 12:31 w0w0 阅读(162) 评论(0) 推荐(0)
摘要: City GameTime Limit: 3000MSMemory Limit: 30000KTotal Submissions: 3983Accepted: 1537DescriptionBob is a strategy game programming specialist. In his new city building game the gaming environment is as follows: a city is built up by areas, in which there are streets, trees,factories and buildings. Th 阅读全文
posted @ 2012-05-05 11:15 w0w0 阅读(201) 评论(0) 推荐(0)
摘要: Communication SystemTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 17803Accepted: 6281DescriptionWe have received an order from Pizoor Communications Inc. for a special communication system. The system consists of several devices. For each device, we are free to choose from several manufac 阅读全文
posted @ 2012-05-04 20:47 w0w0 阅读(168) 评论(0) 推荐(0)
摘要: 滑雪Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 56678Accepted: 20565DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 516 17 18 19 615 24 25 20 714 23 22 21 813 12 11 10 9一个人可以从某个点滑向... 阅读全文
posted @ 2012-05-04 10:44 w0w0 阅读(130) 评论(0) 推荐(0)
摘要: Running MedianTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 742Accepted: 354DescriptionFor this problem, you will write a program that reads in a sequence of 32-bit signed integers. After each odd-indexed value is read, output the median (middle value) of the elements received so far.Inpu 阅读全文
posted @ 2012-05-03 15:56 w0w0 阅读(249) 评论(0) 推荐(0)
摘要: SOLDIERSTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 5599Accepted: 2090DescriptionN soldiers of the land Gridland are randomly scattered around the country. A position in Gridland is given by a pair (x,y) of integer coordinates. Soldiers can move - in one move, one soldier can go one uni 阅读全文
posted @ 2012-05-03 10:08 w0w0 阅读(112) 评论(0) 推荐(0)
摘要: 把python脚本打包成exe文件在windows下把python脚本打包成exe文件,这样在没有安装python环境的电脑上也可以运行用py2exe包来实现需要另外下载:http://prdownloads.sourceforge.net/py2exe安装完之后就可以用了使用方法:如果想打包test.py成exe首先另外新建一个文件setup.py,内容如下:from distutils.core import setupimport py2exesetup(console=["test.py"])#这是控制台程序 如果是窗口程序则写成 windows=["te 阅读全文
posted @ 2012-05-02 11:09 w0w0 阅读(532) 评论(0) 推荐(0)
摘要: 要达到的目的:从特定网页中抓取信息,排版后发送到邮箱中关键点:下载网页,从网页里抓取出需要的信息HTML排版发送到指定邮箱实现:1.python下载网页直接用库函数就可以实现from urllib import urlretrievefrom urllib import urlopendoc = urlopen("http://roll.tech.sina.com.cn/tele/2012-05-01.shtml").read()以获取新浪网5.1电信滚动新闻为例doc就是整个网页的内容2.用正则表达式提取新闻标题和urldef extract_url(info): #re 阅读全文
posted @ 2012-05-02 10:39 w0w0 阅读(1969) 评论(0) 推荐(0)
摘要: python操作excel表格的方法可以用xlrd模块,需要另外下载下载地址:http://pypi.python.org/pypi/xlrd官网地址:http://www.python-excel.org/文档地址:https://secure.simplistix.co.uk/svn/xlrd/trunk/xlrd/doc/xlrd.html文档pdf下载:http://www.simplistix.co.uk/presentations/python-excel.pdf在windows下直接安装就可以1、导入模块 import xlrd2、打开Excel文件读取数据wb = open_w 阅读全文
posted @ 2012-05-02 10:06 w0w0 阅读(441) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 28 下一页