08 2012 档案

hdu 4009 Transfer water
摘要:Transfer waterTime Limit: 5000/3000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 2397Accepted Submission(s): 887Problem DescriptionXiaoA lives in a village. Last year flood rained the village. So they decide to move the whole village to the mountain nearby this year. 阅读全文

posted @ 2012-08-29 19:55 江财小子 阅读(344) 评论(0) 推荐(0) 编辑

POJ 3164 Command Network
摘要:Command NetworkTime Limit: 1000MSMemory Limit: 131072KTotal Submissions: 8780Accepted: 2569DescriptionAfter 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 阅读全文

posted @ 2012-08-28 16:29 江财小子 阅读(563) 评论(0) 推荐(0) 编辑

POJ 1679 The Unique MST
摘要:The Unique MSTTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 15153Accepted: 5241DescriptionGiven 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 阅读全文

posted @ 2012-08-27 10:21 江财小子 阅读(135) 评论(0) 推荐(0) 编辑

POJ 1141 Brackets Sequence
摘要:Brackets SequenceTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 19636Accepted: 5437Special JudgeDescriptionLet us define a regular brackets sequence in the following way: 1. Empty sequence is a regular sequence.2. If S is a regular sequence, then (S) and [S] are both regular sequences.3. I 阅读全文

posted @ 2012-08-08 19:05 江财小子 阅读(184) 评论(0) 推荐(0) 编辑

POJ 3038 Flying Right
摘要:Flying RightTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 1270Accepted: 464DescriptionFiguring that they cannot do worse than the humans have, Farmer John's cows have decided to start an airline. Being cows, they decide to cater to the heretofore-untapped market of cows as passengers. 阅读全文

posted @ 2012-08-08 15:29 江财小子 阅读(353) 评论(0) 推荐(0) 编辑

FZU 1894 志愿者选拔
摘要:Problem 1894 志愿者选拔 Accept: 753Submit: 2495Time Limit: 1500 mSecMemory Limit : 32768 KB Problem Description世博会马上就要开幕了,福州大学组织了一次志愿者选拔活动。参加志愿者选拔的同学们排队接受面试官们的面试。参加面试的同学们按照先来先面试并且先结束的原则接受面试官们的考查。面试中每个人的人品是主要考查对象之一。(提高人品的方法有扶老奶奶过街,不闯红灯等)作为主面试官的John想知道当前正在接受面试的同学队伍中人品值最高的是多少。于是他请你帮忙编写一个程序来计算。 Input输入数据第一行. 阅读全文

posted @ 2012-08-07 16:40 江财小子 阅读(365) 评论(0) 推荐(0) 编辑

POJ 2236 Wireless Network
摘要:Wireless NetworkTime Limit: 10000MSMemory Limit: 65536KTotal Submissions: 12374Accepted: 5217DescriptionAn earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all computers in t 阅读全文

posted @ 2012-08-07 09:52 江财小子 阅读(337) 评论(0) 推荐(0) 编辑

POJ 2823 Sliding Window
摘要:Sliding WindowTime Limit: 12000MSMemory Limit: 65536KTotal Submissions: 26178Accepted: 7738Case Time Limit: 5000MSDescriptionAn array of size n ≤ 106 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers 阅读全文

posted @ 2012-08-06 20:35 江财小子 阅读(472) 评论(0) 推荐(0) 编辑

POJ 1733 Parity game
摘要:Parity gameTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4587Accepted: 1799DescriptionNow and then you play the following game with your friend. Your friend writes down a sequence consisting of zeroes and ones. You choose a continuous subsequence (for example the subsequence from the thir 阅读全文

posted @ 2012-08-06 16:23 江财小子 阅读(478) 评论(0) 推荐(0) 编辑

POJ 1456 Supermarket
摘要:SupermarketTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 6961Accepted: 2903DescriptionA supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral number of time units starting from the moment the sale 阅读全文

posted @ 2012-08-06 09:45 江财小子 阅读(373) 评论(0) 推荐(0) 编辑

FZU 1057 a^b
摘要:Problem 1057 ab Accept: 815 Submit: 2639Time Limit: 1000 mSec Memory Limit : 32768 KBProblem Description对于任意两个正整数a,b(0<=a,b<10000)计算ab各位数字的和的各位数字的和的各位数字的和的各位数字的和。Input输入有多组数据,每组只有一行,包含两个正整数a,b。最后一组a=0,b=0表示输入结束,不需要处理。Output对于每组输入数据,输出ab各位数字的和的各位数字的和的各位数字的和的各位数字的和。Sample Input2 3 5 70 0Samp... 阅读全文

posted @ 2012-08-06 08:54 江财小子 阅读(378) 评论(0) 推荐(0) 编辑

FZU Problem 1924 死锁
摘要:Problem 1924 死锁 Accept: 93Submit: 244Time Limit: 1000 mSecMemory Limit : 32768 KB Problem Description在操作系统中存在着死锁问题。 进程在执行过程中,因争夺资源而造成的一种互相等待的现象,若无外力作用,它们都将无法推进下去。此时称系统处于死锁状态或系统产生了死锁,这些永远在互相等待的进程称为死锁进程。由于资源占用是互斥的,当某个进程提出申请资源后,使得有关进程在无外力协助下,永远分配不到必需的资源而无法继续运行,这就产生了死锁。 例如,如果线程A占用了资源1并等待资源2,而线程B占用了资源2并. 阅读全文

posted @ 2012-08-06 08:28 江财小子 阅读(280) 评论(1) 推荐(0) 编辑

POJ Bookshelf 2(DFS)
摘要:Bookshelf 2Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5109Accepted: 2350DescriptionFarmer John recently bought another bookshelf for the cow library, but the shelf is getting filled up quite quickly, and now the only available space is at the top.FJ has N cows (1 ≤ N ≤ 20) each with so 阅读全文

posted @ 2012-08-06 08:09 江财小子 阅读(187) 评论(0) 推荐(0) 编辑

CodeForces 205B
摘要:- Little Elephant and Sorting Time Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 205BDescriptionThe Little Elephant loves sortings.He has an array a consisting of n integers. Let's number the array elements from 1 to n, then the i-th eleme 阅读全文

posted @ 2012-08-06 08:04 江财小子 阅读(251) 评论(0) 推荐(0) 编辑

hdu 4079 Happy Telephones
摘要:Happy TelephonesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 199Accepted Submission(s): 159Problem DescriptionIn the land of Eden, all phone conversations are happy ones. People complaining on the phone are immediately put in jail. To enforce th 阅读全文

posted @ 2012-08-06 07:57 江财小子 阅读(500) 评论(0) 推荐(0) 编辑

POJ 4045 Power Station
摘要:// 给你一颗树,求一个点,使树上所有点到该点的距离之和最小。//上次金华邀请赛的题目//当时基本没接触过树形DP,连这么经典的都不会//今天写了下、居然排第4,1A,唉、、、//2次DFS,其中的道理在本子上划划就可以明白其中道理#include #include #include #include #include #define N 50005using namespace std;struct Edge{ int to,next;}ed[N<<1];__int64 sd[N];int vc[N];int node[N];int rc[1000],p;__int64 Min; 阅读全文

posted @ 2012-08-05 12:13 江财小子 阅读(312) 评论(0) 推荐(0) 编辑

ZOJ Problem Set - 3632 Watermelon Full of Water
摘要:ZOJ Problem Set - 3632Watermelon Full of WaterTime Limit: 3 Seconds Memory Limit: 65536 KBWatermelon is very popular in the hot summer. Students in ZJU-ICPC Team also love watermelon very much and they hope that they can have watermelon to eat every day during the summer vacation. Suppose there a... 阅读全文

posted @ 2012-08-05 10:20 江财小子 阅读(478) 评论(0) 推荐(0) 编辑

ZOJ Problem Set - 3623 Battle Ships
摘要:Battle ShipsTime Limit: 2 Seconds Memory Limit: 65536 KBBattle Ships is a new game which is similar to Star Craft. In this game, the enemy builds a defense tower, which has L longevity. The player has a military factory, which can produce N kinds of battle ships. The factory takes ti seconds to p... 阅读全文

posted @ 2012-08-04 20:09 江财小子 阅读(530) 评论(0) 推荐(0) 编辑

ZOJ Problem Set - 3626 Treasure Hunt I
摘要:ZOJ Problem Set - 3626Treasure Hunt ITime Limit: 2 Seconds Memory Limit: 65536 KBAkiba is a dangerous country since a bloodsucker living there. Sometimes the bloodsucker will appear and kill everyone who isn't at his hometown. One day, a brave person named CC finds a treasure map, and he wants t 阅读全文

posted @ 2012-08-04 17:28 江财小子 阅读(266) 评论(0) 推荐(0) 编辑

hdu 1561 The more, The Better
摘要:The more, The BetterTime Limit: 6000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2850Accepted Submission(s): 1684Problem DescriptionACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中ACboy允许攻克M个城堡并获得里面的宝物。但由于地理位置原因,有些城堡不能直接攻克,要攻克这些城堡必须先攻克其他某一个特定的城堡。你能帮ACboy算出要获得尽量多 阅读全文

posted @ 2012-08-04 12:59 江财小子 阅读(506) 评论(0) 推荐(0) 编辑

POJ 2342 Anniversary party
摘要:// 题意: 每个节点有权值,子节点和父节点不能同时选,问最后能选的最大价值是多少?// 那么每个点就有两种选择 选或不选了//第一道树形DP,虽然1Y了、不过好慢//HDu上这题居然是多组数据、然后我就超时了、表示还要好好研究//我感觉我不怎么会建树、、#include #include #include #include #include #include #define N 6002using namespace std;vector v[N];bool b[N];int dp[N][2],hp[N];void dfs(int k){ int i,len=v[k].size();... 阅读全文

posted @ 2012-08-04 09:50 江财小子 阅读(483) 评论(0) 推荐(0) 编辑

hdu 4339 Query
摘要:QueryTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1009Accepted Submission(s): 302Problem DescriptionYou are given two strings s1[0..l1], s2[0..l2] and Q - number of queries.Your task is to answer next queries:1) 1 a i c - you should set i-th c 阅读全文

posted @ 2012-08-04 09:00 江财小子 阅读(557) 评论(0) 推荐(0) 编辑

hdu 4324 Triangle LOVE
摘要:Triangle LOVETime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 894Accepted Submission(s): 373Problem DescriptionRecently, scientists find that there is love between any of two people. For example, between A and B, if A don’t love B, then B must love 阅读全文

posted @ 2012-08-03 16:29 江财小子 阅读(926) 评论(1) 推荐(0) 编辑

hdu 4320 Arcane Numbers 1
摘要:Arcane Numbers 1Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1468Accepted Submission(s): 466Problem DescriptionVance and Shackler like playing games. One day, they are playing a game called "arcane numbers". The game is pretty simple, 阅读全文

posted @ 2012-08-03 15:34 江财小子 阅读(319) 评论(0) 推荐(0) 编辑

hdu 4325 Flowers
摘要:Problem F Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 332Accepted Submission(s): 143 Problem DescriptionAs is known to all, the blooming time and duration varies between different kinds of flowers. Now there is a garden planted full of flower 阅读全文

posted @ 2012-08-03 13:34 江财小子 阅读(268) 评论(0) 推荐(0) 编辑

hdu 1007 Quoit Design
摘要:Quoit DesignTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15345Accepted Submission(s): 3814Problem DescriptionHave you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all the toys encircled a 阅读全文

posted @ 2012-08-02 19:03 江财小子 阅读(1418) 评论(0) 推荐(0) 编辑

hdu 1006 Tick and Tick
摘要:Tick and TickTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5214Accepted Submission(s): 1402Problem DescriptionThe three hands of the clock are rotating every second and meeting each other many times everyday. Finally, they get bored of this and e 阅读全文

posted @ 2012-08-02 10:30 江财小子 阅读(2332) 评论(0) 推荐(0) 编辑

CodeForces 101A Homework
摘要:A. Homeworktime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOnce when Gerald studied in the first year at school, his teacher gave the class the following homework. She offered the students a string consisting of n small Latin letters; the task wa 阅读全文

posted @ 2012-08-01 19:59 江财小子 阅读(497) 评论(1) 推荐(0) 编辑

Poj 1730 Perfect Pth Powers
摘要:Perfect Pth PowersTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 14512Accepted: 3263DescriptionWe say that x is a perfect square if, for some integer b, x = b2. Similarly, x is a perfect cube if, for some integer b, x = b3. More generally, x is a perfect pth power if, for some integer b, x 阅读全文

posted @ 2012-08-01 18:12 江财小子 阅读(272) 评论(0) 推荐(0) 编辑

poj 3126 Prime Path(BFS)
摘要:Prime PathTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 7574Accepted: 4302DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices. — It is a matter of securit 阅读全文

posted @ 2012-08-01 16:18 江财小子 阅读(152) 评论(0) 推荐(0) 编辑

ZOJ Problem Set - 1879
摘要:ZOJ Problem Set - 1879Jolly JumpersTime Limit: 2 Seconds Memory Limit: 65536 KBA sequence of n > 0 integers is called a jolly jumper if the absolute values of the difference between successive elements take on all the values 1 through n-1. For instance,1 4 2 3is a jolly jumper, because the absolu 阅读全文

posted @ 2012-08-01 15:34 江财小子 阅读(153) 评论(0) 推荐(0) 编辑

hdu 2516 取石子游戏
摘要:取石子游戏Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1304Accepted Submission(s): 732Problem Description1堆石子有n个,两人轮流取.先取者第1次可以取任意多个,但不能全部取完.以后每次取的石子数不能超过上次取子数的2倍。取完者胜.先取者负输出"Second win".先取者胜输出"First win".Input输入有多组.每组第1行是2<=n& 阅读全文

posted @ 2012-08-01 14:56 江财小子 阅读(206) 评论(0) 推荐(0) 编辑

hdu 1069 Monkey and Banana
摘要:Monkey and BananaTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3987Accepted Submission(s): 2053Problem DescriptionA group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, an 阅读全文

posted @ 2012-08-01 13:51 江财小子 阅读(1332) 评论(0) 推荐(0) 编辑

lightOJ 1006 - Hex-a-bonacci
摘要:1006 - Hex-a-bonacci PDF (English) Statistics Forum Time Limit: 0.5 second(s)Memory Limit: 32 MBGiven a code (not optimized), and necessary inputs, you have to find the output of the code for the inputs. The code is as follows:inta,b,c,d,e,f;intfn(intn){if(n==0)returna;if(n==1)returnb;if(n==2)retu.. 阅读全文

posted @ 2012-08-01 12:09 江财小子 阅读(325) 评论(0) 推荐(0) 编辑

POJ 2533 Longest Ordered Subsequence
摘要:Longest Ordered SubsequenceTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 23690Accepted: 10236DescriptionA numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence (a1, a2, ..., aN) be any sequence (ai1, ai2, ..., aiK), where 1 < 阅读全文

posted @ 2012-08-01 11:52 江财小子 阅读(163) 评论(0) 推荐(0) 编辑

hdu 1081 To The Max
摘要:To The MaxTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4825Accepted Submission(s): 2281Problem DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1 x 1 or greater locat 阅读全文

posted @ 2012-08-01 11:01 江财小子 阅读(159) 评论(0) 推荐(0) 编辑

lightOJ 1202 Bishops
摘要:1202 - Bishops PDF (English) Statistics Forum Time Limit: 1 second(s)Memory Limit: 32 MBThere is an Infinite chessboard. Two bishops are there. (Bishop means the chess piece that moves diagonally).Now you are given the position of the two bishops. You have to find the minimum chess moves to take o.. 阅读全文

posted @ 2012-08-01 10:37 江财小子 阅读(296) 评论(0) 推荐(0) 编辑

hdu 4027 Can you answer these queries?
摘要:Can you answer these queries?Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 4315Accepted Submission(s): 1036Problem DescriptionA lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to 阅读全文

posted @ 2012-08-01 08:47 江财小子 阅读(454) 评论(0) 推荐(0) 编辑

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