- 博客(87)
- 收藏
- 关注
原创 zoj 3180 Number Game
Number GameTime Limit: 1 Second Memory Limit: 32768 KB Gordon is recently reading about an interesting game. At the beginning of the game, there are three positive numbers written on a
2013-05-04 21:50:34
2117
原创 zoj 3176 Rounding or Truncation
C - Rounding or TruncationTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%lld & %lluSubmitStatusDescriptionKaspersky Anti-Virus (often referred to as KAV) is an antivirus
2013-05-03 23:36:48
2005
原创 hdu 4414
Finding crossesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 666 Accepted Submission(s): 378Problem DescriptionThe Nazca Lines
2013-04-25 18:01:07
1586
原创 HDU 4462 Scaring the Birds
Scaring the BirdsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 624 Accepted Submission(s): 220Problem DescriptionIt’s harvest s
2013-04-25 15:54:38
1706
原创 hdu 1281
棋盘游戏Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1461 Accepted Submission(s): 840Problem Description小希和Gardon在玩一个游戏:对一个N*M的棋盘,
2013-04-21 15:22:43
1634
原创 hdu 1179
Ollivanders: Makers of Fine Wands since 382 BC.Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 479 Accepted Submission(s): 260Prob
2013-04-21 10:04:27
1777
原创 hdu 1151
Air RaidTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2212 Accepted Submission(s): 1423Problem DescriptionConsider a town where
2013-04-20 20:51:52
1620
原创 hdu 1150
“HDOJ新浪微博” “HDOJ腾讯微博”欢迎关注~Machine ScheduleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3939 Accepted Submission(s): 1910
2013-04-20 20:21:30
1550
原创 hdu 1068
Girls and BoysTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5303 Accepted Submission(s): 2360Problem Descriptionthe second ye
2013-04-20 16:23:31
1494
原创 最短路+dp uva 10269
Problem AAdventure of Super MarioInput: Standard InputOutput: Standard OutputAfter rescuing the beautiful princess, Super Mario needs to find a way home -- with theprincess of course :-) H
2013-04-13 15:49:16
2038
原创 uva 11624 Fire!
A - Fire!Time Limit:1000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmitStatusDescriptionProblem B: Fire!Joe works in a maze. Unfortunately, portions of the maze have caught
2013-04-10 14:59:20
2678
原创 hdu 1548 最短路
A strange liftTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7604 Accepted Submission(s): 2856Problem DescriptionThere is a stra
2013-04-09 20:23:33
1510
原创 poj 1523 SPF
SPFTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 4263 Accepted: 1967DescriptionConsider the two networks shown below. Assuming that data moves around
2013-03-31 16:19:53
1497
原创 hdu 2576 Queen Collisions
Queen CollisionsTime Limit: 1000MS Memory limit: 65536K题目描述 Lots of time has been spent by computer science students dealing with queens on a chess board. Tw
2013-03-30 20:09:04
1768
原创 poj 2186 Popular Cows
题目:Popular CowsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 18659 Accepted: 7516DescriptionEvery cow's dream is to become the most popular co
2013-03-29 10:37:09
1459
原创 zoj 3204Connect them prim算法
Connect themTime Limit: 1 Second Memory Limit: 32768 KBYou have n computers numbered from 1 to n and you want to connect them to make a small local area network (LAN). All connections a
2013-03-22 11:54:01
1799
原创 Channel Allocation
Channel AllocationTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 10439 Accepted: 5320DescriptionWhen a radio station is broadcasting over a very large ar
2013-03-19 19:10:23
1560
原创 Fermat’s Chirstmas Theorem
Fermat’s Chirstmas Theorem Time Limit: 1000MS Memory limit: 65536K 题目描述In a letter dated December 25, 1640; the great mathematician Pierre de Fermat wrote to Marin Mersenne that he just pr
2013-03-18 18:55:13
1674
原创 Rotating Rings
Rotating RingsTime Limit: 1000MS Memory limit: 65536K 题目描述Any square grid can be viewed as one or more rings, one inside the other. For example, as shown in figure (a), a 5 ∗ 5 grid is
2013-03-18 18:52:37
1669
原创 A Tale from the Dark Side of The Moon
A Tale from the Dark Side of The MoonTime Limit: 1000MS Memory limit: 65536K 题目描述Us: So why don’t you just recompile the program Us: What about "ddd" and "dddd"? How does it on the new har
2013-03-16 20:07:23
1557
原创 题
Judging Olympia Time Limit: 1000MS Memory limit: 65536K 题目描述 For years, a group of Regional Contest Directors (RCDs) of the ACM International Collegiate Programming Contest (ICPC) have
2013-03-16 19:26:23
626
原创 zoj 2851 Code Formatter
Code FormatterTime Limit: 2 Seconds Memory Limit: 65536 KB Some companies have special requirements for source code format, and it is also good for programmers to keep consistent code s
2013-03-08 14:50:49
675
原创 pku Graph Coloring
Graph ColoringTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 3352 Accepted: 1497 Special JudgeDescriptionYou are to write a program that tries to fin
2013-03-07 14:09:36
727
原创 hdu 1530 Maximum Clique
Maximum CliqueTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1906 Accepted Submission(s): 1033Problem DescriptionGiven a graph
2013-03-07 14:03:36
1545
原创 hdu 3342 Legal or Not
Legal or NotTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2602 Accepted Submission(s): 1158Problem DescriptionACM-DIY is a larg
2013-03-05 19:47:24
678
原创 hdu 1285 确定比赛名次
确定比赛名次Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7059 Accepted Submission(s): 2674Problem Description有N个比赛队(1 Input
2013-03-05 18:54:03
1319
原创 poj 1018 Communication System
链接:http://poj.org/problem?id=1018题目大意:有n个设备,每个设备有mi个制造商,每个设备选一个制造商,使最后选择的n个制造商的B/p值最大,b是选择的最小b值,p为所有选择的p值得总和题目思路:搜索超时,贪心解决;原题:Communication SystemTime Limit: 1000MS Memory
2013-03-02 19:40:57
1152
原创 poj 1015 Jury Compromise
链接:http://poj.org/problem?id=1015题目大意:求两组中m个的和之后的差最小,题目思路:动态规划,可行方案dp(j-1, x)能演化成方案dp(j, k)的必要条件是:存在某个候选人i,i 在方案dp(j-1, x)中没有被选上,且x+V(i) = k。在所有满足该必要条件的dp(j-1, x)中,选出 dp(j-1, x) + S(i) 的值最大的那个,那
2013-03-01 23:36:51
851
原创 最长公共子序列
若给定序列X={x1,x2,…,xm},则另一序列Z={z1,z2,…,zk},是X的子序列是指存在一个严格递增下标序列{i1,i2,…,ik}使得对于所有j=1,2,…,k有:zj=xij。例如,序列Z={B,C,D,B}是序列X={A,B,C,B,D,A,B}的子序列,相应的递增下标序列为{2,3,5,7}。 给定2个序列X和Y,当另一序列Z既是X的子序列又是Y
2013-02-27 19:27:33
4459
原创 矩阵连乘问题
给定n个矩阵{A1,A2,…,An},其中Ai与Ai+1是可乘的,i=1,2 ,…,n-1。如何确定计算矩阵连乘积的计算次序,使得依此次序计算矩阵连乘积需要的数乘次数最少。题解:动态规划设计算A[i:j],1当i==j时,A[i:j]=Ai,因此,m[i,i]=0;,i=1,2,3,.....n当im[i,:j]=m[i,k]+m[k+1,j]+pi-1*pk*pj
2013-02-27 16:11:13
595
转载 D. Tetragon
D. Tetragontime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou're given the centers of three equal sides of a strict
2013-02-27 09:38:15
406
原创 C. Oranges and Apples
C. Oranges and Applestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn 2N - 1 boxes there are apples and oranges. Y
2013-02-26 19:50:36
431
原创 B. Party
B. Partytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputn people came to a party. Then those, who had no friends amo
2013-02-26 19:47:12
621
原创 A. You're Given a String...
A. You're Given a String...time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou're given a string of lower-case Latin
2013-02-26 19:45:48
830
原创 n皇后问题
【题目】N皇后问题(含八皇后问题的扩展,规则同八皇后):在N*N的棋盘上,放置N个皇后,要求每一横行每一列,每一对角线上均只能放置一个皇后,问可能的方案及方案数。代码1: #include #include #include #include #include using namespace std; #define N 15
2013-02-26 18:20:28
480
原创 The Best Seat in ACM Contest
原题:The Best Seat in ACM Contest Time Limit: 1000MS Memory limit: 65536K 题目描述Cainiao is a university student who loves ACM contest very much. It is a festival for him once when he a
2013-02-24 14:55:30
349
原创 Pick apples
原题Pick apples Time 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 c
2013-02-24 14:48:21
1084
原创 hdu 3251 Being a Hero
题目:Being a HeroTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 678 Accepted Submission(s): 213Special JudgeProblem Descriptio
2013-02-22 18:24:50
463
原创 hdu 3395 Special Fish
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3395题目大意:求交配后代 的最大值,注意每只鱼最多攻击别的一次和被攻击一次题目思路:可能交配的鱼之间连边,用最大权匹配,KM算法原题Special FishTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 327
2013-02-21 16:22:16
775
原创 hdu 1569 方格取数(2)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1569题目思路:因为这个数据比较大,所以用动态规划会超时。 将图转换成黑白棋盘问题,i + j 为奇数的与s节点相连,边的权值为棋盘上对应位置的值,其他的与t节点相连,边的权值为棋盘上对应位置的值,然后让棋盘上相邻之间的节点用边相连,边的权值为INF。这样问题就转换为了最大点权独立集问题
2013-02-21 12:06:12
731
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人