08 2013 档案
摘要:FriendshipTime Limit:2000MSMemory Limit:20000KTotal Submissions:8233Accepted:2297DescriptionIn modern society, each person has his own friends. Since all the people are very busy, they communicate with each other only by phone. You can assume that peop...
阅读全文
摘要:ParatroopersTime Limit:2 Seconds Memory Limit:32768 KBIt is year 2500 A.D. and there is a terrible war between the forces of the Earth and the Mars. Recently, the commanders of the Earth are informed by their spies that the invaders of Mars want to land some paratroopers in them * ngrid yard of one
阅读全文
摘要:Optimal MilkingTime Limit:2000MSMemory Limit:30000KTotal Submissions:10100Accepted:3672Case Time Limit:1000MSDescriptionFJ has moved his K (1 15, a row is broken into successive lines of 15 numbers and a potentially shorter line to finish up a r...
阅读全文
摘要:样例输入: 6 10 0 1 8 2 0 2 4 3 1 3 2 2 1 4 2 2 2 1 4 2 2 3 1 1 2 4 4 0 3 4 6 0 3 5 9 3 4 5 7 2样例输出:0->1 : 40->2 : 41->3 : 21->4 : 22->1 : 02->3 : 12->4 : 33->4 : 03->5 : 34->5 : 5maxFlow : 8#include #include #include #define MAXN 1000 //顶点个数最大值#define INF 1000000 //无穷大#defi
阅读全文
摘要:方格取数(1)Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3600Accepted Submission(s): 1373Problem Description给你一个n*n的格子的棋盘,每个格子里面有一个非负数。从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取的数所在的2个格子不能相邻,并且取出的数的和最大。Input包括多个测试实例,每个测试实例包括一个整数n 和n*n个非负数(n#in...
阅读全文
摘要:跑跑卡丁车Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1862Accepted Submission(s): 622Problem Description跑跑卡丁车是时下一款流行的网络休闲游戏,你可以在这虚拟的世界里体验驾驶的乐趣。这款游戏的特别之处是你可以通过漂移来获得一种加速卡,用这种加速卡可以在有限的时间里提高你的速度。为了使问题简单化,我们假设一个赛道分为L段,并且给你通过每段赛道的普通耗时Ai和...
阅读全文
摘要:Max Sum Plus Plus PlusTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 978Accepted Submission(s): 487Problem Description给定一个由n个正整数组成的整数序列a1 a2 a3 ... an求按先后次序在其中取m段长度分别为l1、l2、l3...lm的不交叠的连续整数的和的最大值。Input第一行是一个整数n(0 ≤ n ≤ 1000),n = 0表示输入...
阅读全文
摘要:反恐训练营Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2431Accepted Submission(s): 538Problem Description当今国际反恐形势很严峻,特别是美国“9.11事件”以后,国际恐怖势力更是有恃无恐,制造了多起骇人听闻的恐怖事件。基于此,各国都十分担心恐怖势力会对本国社会造成的不稳定,于是纷纷在本国的军队、警察队伍中开展了反恐训练。作为反恐立场坚定的大国,中国也十分重视在人民...
阅读全文
摘要:Drainage DitchesTime Limit:1000MSMemory Limit:10000KTotal Submissions:49349Accepted:18689DescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhile ...
阅读全文
摘要:PIGSTime Limit:1000MSMemory Limit:10000KTotal Submissions:14239Accepted:6330DescriptionMirko works on a pig farm that consists of M locked pig-houses and Mirko can't unlock any pighouse because he doesn't have the keys. Customers come to the farm one a...
阅读全文
摘要:A Simple Problem with IntegersTime Limit:5000MSMemory Limit:131072KTotal Submissions:47204Accepted:13856Case Time Limit:2000MSDescriptionYou haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add so...
阅读全文
摘要:BillboardTime Limit: 20000/8000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7653Accepted Submission(s): 3398Problem DescriptionAt the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its widt...
阅读全文
摘要:Buy TicketsTime Limit:4000MSMemory Limit:65536KTotal Submissions:10677Accepted:5173DescriptionRailway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue…The Lunar New Year was approaching, but u...
阅读全文
摘要:Mayor's postersTime Limit:1000MSMemory Limit:65536KTotal Submissions:34731Accepted:10072DescriptionThe citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places ...
阅读全文
摘要:Who Gets the Most Candies?Time Limit:5000MSMemory Limit:131072KTotal Submissions:8055Accepted:2406Case Time Limit:2000MSDescriptionNchildren are sitting in a circle to play a game.The children are numbered from 1 toNin clockwise order. Each of them has a card with ...
阅读全文
摘要:MatrixTime Limit:3000MSMemory Limit:65536KTotal Submissions:15090Accepted:5662DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j] = 0 (1 b。 a...
阅读全文
摘要:CowsTime Limit:3000MSMemory Limit:65536KTotal Submissions:10236Accepted:3351DescriptionFarmer John's cows have discovered that the clover growing along the ridge of the hill (which we can think of as a one-dimensional number line) in his field is partic...
阅读全文
摘要:StarsTime Limit:1000MSMemory Limit:65536KTotal Submissions:26835Accepted:11712DescriptionAstronomers 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...
阅读全文
摘要:Balanced LineupTime Limit:5000MSMemory Limit:65536KTotal Submissions:28628Accepted:13468Case Time Limit:2000MSDescriptionFor the daily milking, Farmer John'sNcows (1 ≤N≤ 50,000) always line up in the same order. One day Farmer John decides to organize a ga...
阅读全文
摘要:敌兵布阵Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 30363Accepted Submission(s): 13012Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清...
阅读全文
摘要:Place the RobotsTime Limit:5 Seconds Memory Limit:32768 KBRobert is a famous engineer. One day he was given a task by his boss. The background of the task was the following:Given a map consisting of square blocks. There were three kinds of blocks: Wall, Grass, and Empty. His boss wanted to place as
阅读全文
摘要:WormTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2283Accepted Submission(s): 1462Problem Description自从见识了平安夜苹果的涨价后,Lele就在他家门口水平种了一排苹果树,共有N棵。突然Lele发现在左起第P棵树上(从1开始计数)有一条毛毛虫。为了看到毛毛虫变蝴蝶的过程,Lele在苹果树旁观察了很久。虽然没有看到蝴蝶,但Lele发现了一个规律:每过1分钟,毛...
阅读全文
摘要:Ignatius and the Princess IIITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9963Accepted Submission(s): 7052Problem Description"Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says.&
阅读全文
摘要:Square CoinsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6738Accepted Submission(s): 4547Problem DescriptionPeople in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins wi...
阅读全文
摘要:不容易系列之一Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11803Accepted Submission(s): 4911Problem Description大家常常感慨,要做好一件事情真的不容易,确实,失败比成功容易多了!做好“一件”事情尚且不易,若想永远成功而总从不失败,那更是难上加难了,就像花钱总是比挣钱容易的道理一样。话虽这样说,我还是要告诉大家,要想失败到一定程度也是不容易的。比如,我高中的时候,就有一...
阅读全文
摘要:AssignmentTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 659Accepted Submission(s): 342Problem DescriptionLast year a terrible earthquake attacked Sichuan province. About 300,000 PLA soldiers attended the rescue, also ALPCs. Our mis...
阅读全文
摘要:Going HomeTime Limit:1000MSMemory Limit:65536KTotal Submissions:15624Accepted:7996DescriptionOn a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, or vertically, to an adjac...
阅读全文
摘要:Tree RecoveryTime Limit:1000MSMemory Limit:65536KTotal Submissions:9710Accepted:6105DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital letters in t...
阅读全文
摘要:棋盘游戏Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1650Accepted Submission(s): 947Problem Description小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个问题(见下图)注意不能放车的地方不影响车的互相...
阅读全文
摘要:The Perfect StallTime Limit:1000MSMemory Limit:10000KTotal Submissions:16254Accepted:7433DescriptionFarmer John completed his new barn just last week, complete with all the latest milking technology. Unfortunately, due to engineering problems, all the stall...
阅读全文
摘要:Machine ScheduleTime Limit:2 Seconds Memory Limit:65536 KBAs we all know, machine scheduling is a very classical problem in computer science and has been studied for a very long history. Scheduling problems differ widely in the nature of the constraints that must be satisfied and the type of schedul
阅读全文
摘要:Girls and BoysTime Limit:10 Seconds Memory Limit:32768 KBthe second year of the university somebody started a study on the romantic relations between the students. The relation ��romantically involved�� is defined between one girl and one boy. For the study reasons it is necessary to find out the ma
阅读全文
摘要:AsteroidsTime Limit:1000MSMemory Limit:65536KTotal Submissions:12270Accepted:6679DescriptionBessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 using namespace std; const int N = 510; //定...
阅读全文
摘要:Schedule ProblemTime Limit:2 Seconds Memory Limit:65536 KB Special JudgeA project can be divided into several parts. Each part should be completed continuously. This means if a part should take 3 days, we should use a continuous 3 days do complete it. There are four types of constrains among these p
阅读全文
摘要:FatMouse's SpeedTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7299Accepted Submission(s): 3229Special JudgeProblem DescriptionFatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the ...
阅读全文
摘要:Burn the Linked CampTime Limit:2 Seconds Memory Limit:65536 KBIt is well known that, in the period of The Three Empires, Liu Bei, the emperor of the Shu Empire, was defeated by Lu Xun, a general of the Wu Empire. The defeat was due to Liu Bei's wrong decision that he divided his large troops int
阅读全文
摘要:COURSESTime Limit:1000MSMemory Limit:10000KTotal Submissions:15394Accepted:6082DescriptionConsider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whether it is possible to form a ...
阅读全文
摘要:LayoutTime Limit:1000MSMemory Limit:65536KTotal Submissions:5492Accepted:2624DescriptionLike everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 #includeusing namespace std;const int N = 1005; //有N头牛c...
阅读全文
摘要:Bone CollectorTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 21417Accepted Submission(s): 8613 Problem DescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , suc
阅读全文
摘要:Max SumTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 112856Accepted Submission(s): 26084Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, giv...
阅读全文
摘要:最大连续子序列Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15424Accepted Submission(s): 6745Problem Description给定K个整数的序列{ N1, N2, ..., NK },其任意连续子序列可表示为{ Ni, Ni+1, ...,Nj },其中 1 #include#includeusing namespace std;int main(){ int ...
阅读全文
摘要:免费馅饼Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19487Accepted Submission(s): 6515Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接...
阅读全文
摘要:Super Jumping! Jumping! Jumping!Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17487Accepted Submission(s): 7492Problem DescriptionNowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe yo...
阅读全文
摘要:数塔Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15891Accepted Submission(s): 9494Problem Description在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个DP的题目,你能AC吗?Input输入数据首先包括一个整数C,表示测试实...
阅读全文
摘要:BeatTime Limit: 6000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 374Accepted Submission(s): 242Problem DescriptionZty is a man that always full of enthusiasm. He wants to solve every kind of difficulty ACM problem in the world. And he has a ha...
阅读全文
摘要:N皇后问题Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5654Accepted Submission(s): 2555Problem Description在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后...
阅读全文
摘要:哈密顿绕行世界问题Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 796Accepted Submission(s): 481Problem Description一个规则的实心十二面体,它的 20个顶点标出世界著名的20个城市,你从一个城市出发经过每个城市刚好一次后回到出发的城市。Input前20行的第i行有3个数,表示与第i个城市相邻的3个城市.第20行以后每行有1个数m,m=1.m=0退出.Output输出从第m个城市出发经过每个城市1次
阅读全文
摘要:棋盘问题Time Limit:1000MSMemory Limit:10000KTotal Submissions:18623Accepted:9236Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及...
阅读全文
摘要:A strange liftTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8530Accepted Submission(s): 3232Problem DescriptionThere is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 #include#includ...
阅读全文

浙公网安备 33010602011771号