![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM
守护生命的绿荷
这个作者很懒,什么都没留下…
展开
-
算法导论 经典算法实现 quicksort
#include using namespace std;//int Partition(int A[], int p,int r){ int x = A[r]; int i = p - 1; for(int j = p; j<r; j++){ if (A[j] <= x){ i = i + 1; swap(A[i],A[j]); } } swap(A原创 2017-09-29 13:30:00 · 282 阅读 · 0 评论 -
九度oj 题目1008:最短路径问题
题目1008:最短路径问题时间限制:1 秒内存限制:32 兆特殊判题:否提交:5597解决:1800题目描述:给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。输入:输入n,m,点的编号是1~n,然后是m行,每行4个数原创 2014-08-28 00:05:02 · 389 阅读 · 0 评论 -
poj 1724 ROADS 邻接表+优先队列+spfa()
ROADSTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10804 Accepted: 3976DescriptionN cities named with numbers 1 ... N are connected with one-way roads原创 2014-08-12 19:31:46 · 372 阅读 · 0 评论 -
poj 3660 Cow Contest
Cow ContestTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7016 Accepted: 3853DescriptionN (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participa原创 2014-08-12 15:54:58 · 370 阅读 · 0 评论 -
poj 1797 Heavy Transportation
Heavy TransportationTime Limit: 3000MS Memory Limit: 30000KTotal Submissions: 20261 Accepted: 5384DescriptionBackground Hugo Heavy is happy. After the breakdown原创 2014-08-12 20:57:06 · 319 阅读 · 0 评论 -
poj 1125 Stockbroker Grapevine
Stockbroker GrapevineTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 26894 Accepted: 14889DescriptionStockbrokers are known to overreact to rumours. You原创 2014-08-11 17:44:46 · 323 阅读 · 0 评论 -
poj 1511 Invitation Cards
Invitation CardsTime Limit: 8000MS Memory Limit: 262144KTotal Submissions: 19201 Accepted: 6306DescriptionIn the age of television, not many people attend theater原创 2014-08-12 14:58:31 · 311 阅读 · 0 评论 -
uva-10038- Jolly Jumper
Problem E: Jolly JumpersA 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 ins原创 2014-08-11 15:05:40 · 1397 阅读 · 0 评论 -
poj 2387 Til the Cows Come Home
Til the Cows Come HomeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 29645 Accepted: 9967DescriptionBessie is out in the field and wants to get back to原创 2014-08-11 16:25:08 · 249 阅读 · 0 评论 -
hdu 2544 最短路
最短路Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 31952 Accepted Submission(s): 13844Problem Description在每年的校赛里,所有进入决赛的同学都会获原创 2014-08-11 16:08:28 · 299 阅读 · 0 评论 -
hdu 2124 Repair the Wall
Repair the WallTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2090 Accepted Submission(s): 1014Problem DescriptionLong time原创 2014-08-11 08:53:05 · 317 阅读 · 0 评论 -
hdu 1800 Flying to the Mars(贪心)
Flying to the MarsTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10941 Accepted Submission(s): 3507Problem DescriptionIn原创 2014-08-08 19:25:53 · 321 阅读 · 0 评论 -
hdu 1875 畅通工程再续
畅通工程再续Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 14761 Accepted Submission(s): 4556Problem Description相信大家都听说一个“百岛湖”的地方吧原创 2014-08-08 17:03:10 · 266 阅读 · 0 评论 -
hdu-2187悼念512汶川大地震遇难同胞——老人是真饿了(贪心)
悼念512汶川大地震遇难同胞——老人是真饿了Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7473 Accepted Submission(s): 3117Problem Description时间:原创 2014-08-08 19:22:25 · 471 阅读 · 0 评论 -
hdu hdu-2111-Saving HDU
Saving HDUTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5249 Accepted Submission(s): 2400Problem Description话说上回讲到海东集团面临内外交原创 2014-08-08 20:29:52 · 423 阅读 · 0 评论 -
hdu -1052-Tian Ji -- The Horse Racing
Tian Ji -- The Horse RacingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18118 Accepted Submission(s): 5264Problem Description原创 2014-08-08 20:10:36 · 410 阅读 · 0 评论 -
hdu 1224 Free DIY Tour
Free DIY TourTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3942 Accepted Submission(s): 1264Problem DescriptionWeiwei is a原创 2014-08-14 20:04:52 · 317 阅读 · 0 评论 -
九度oj 题目1009:二叉搜索树
import java.io.BufferedInputStream;import java.util.Scanner;public class Main1009 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner cin=new Scanner(new Bu原创 2014-08-27 22:23:55 · 466 阅读 · 0 评论 -
Hdu 2079 (母函数应用)
选课时间(题目已修改,注意读题)Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2962 Accepted Submission(s): 2322Problem Description又到了选课的时间了原创 2014-10-21 20:48:48 · 376 阅读 · 0 评论 -
hdu 1847(博弈)
Good Luck in CET-4 Everybody!Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5489 Accepted Submission(s): 3531Problem Description原创 2014-10-22 14:41:37 · 320 阅读 · 0 评论 -
HDU 1849(尼姆博弈)
Rabbit and GrassTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2200 Accepted Submission(s): 1669Problem Description大学时光是浪漫的,原创 2014-10-22 14:35:09 · 324 阅读 · 0 评论 -
HDU 1848 (SG)
Fibonacci again and againTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5365 Accepted Submission(s): 2250Problem Description原创 2014-10-22 14:30:37 · 374 阅读 · 0 评论 -
HDU 1250(JAVA版)
Hat's FibonacciTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7854 Accepted Submission(s): 2551Problem DescriptionA Fibonacc原创 2014-10-20 16:49:31 · 378 阅读 · 0 评论 -
HDU 1250
Hat's FibonacciTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7847 Accepted Submission(s): 2549Problem DescriptionA Fibonacc原创 2014-10-19 22:02:28 · 307 阅读 · 0 评论 -
hdu 2063
过山车Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11491 Accepted Submission(s): 5056Problem DescriptionRPG girls今天和大家一起去游乐场玩原创 2014-10-28 20:40:37 · 347 阅读 · 0 评论 -
hdu 2114
Calculate S(n)Time Limit: 10000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7961 Accepted Submission(s): 2923Problem DescriptionCalculate原创 2014-10-29 18:28:14 · 399 阅读 · 0 评论 -
HDU 1051(贪心)
Wooden SticksTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12179 Accepted Submission(s): 5050Problem DescriptionThere is a原创 2014-10-27 16:42:06 · 292 阅读 · 0 评论 -
HDU 1228(简单的字符处理)
A + BTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12190 Accepted Submission(s): 7130Problem Description读入两个小于100的正整数A和B,计算原创 2014-10-27 16:58:16 · 305 阅读 · 0 评论 -
HDU 1556(树状数组)
Color the ballTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9755 Accepted Submission(s): 5020Problem DescriptionN个气球排成一排,从左原创 2014-10-27 16:53:15 · 289 阅读 · 0 评论 -
HDU 1042 (大数)
N!Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 56027 Accepted Submission(s): 15904Problem DescriptionGiven an integer N(0原创 2014-10-27 16:37:29 · 297 阅读 · 0 评论 -
HDU 1267(简单的动态规划)
下沙的沙子有几粒?Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2844 Accepted Submission(s): 1491Problem Description2005年11月份,我们学校参加原创 2014-10-27 16:48:05 · 526 阅读 · 0 评论 -
hdu 1789
Doing Homework againTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6879 Accepted Submission(s): 4097Problem DescriptionIgnat原创 2014-10-27 16:34:49 · 294 阅读 · 0 评论 -
hdu 1850(妮姆博奕)
Being a Good Boy in Spring FestivalTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4832 Accepted Submission(s): 2887Problem Descr原创 2014-10-22 14:52:57 · 681 阅读 · 0 评论 -
hdu 1846 (博弈)
Brave GameTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6808 Accepted Submission(s): 4580Problem Description十年前读大学的时候,中国每年都原创 2014-10-22 14:34:21 · 350 阅读 · 0 评论 -
hdu 1051 woolen sticks(贪心)
Wooden SticksTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11644 Accepted Submission(s): 4817Problem DescriptionThere is a原创 2014-08-08 19:16:02 · 490 阅读 · 0 评论 -
poj 3624 Charm Bracelet
Charm BraceletTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 23039 Accepted: 10364DescriptionBessie has gone to the mall's jewelry store and spies a ch原创 2014-08-01 13:54:56 · 217 阅读 · 0 评论 -
hdu 2602 Bone Collector
Bone CollectorTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 29155 Accepted Submission(s): 11919Problem DescriptionMany year原创 2014-08-01 09:52:26 · 229 阅读 · 0 评论 -
uva-10763-Foreign Exchange
#include #include #include #include using namespace std;int a[500005],b[500005];int main(){int n,i;while(scanf("%d",&n),n){ for(i=0;i scanf("%d %d",&a[i],&b[i]); sort(a,原创 2014-07-30 08:51:40 · 867 阅读 · 1 评论 -
uva-10905-Childden’s game
#include #include #include #include #include using namespace std;string word[55];bool cmp(string a,string b){return a+b>b+a;}int main(){int n;while(scanf("%d",&n),n){for(in原创 2014-07-30 08:44:50 · 323 阅读 · 0 评论 -
poj 1083 Moving Tables
Moving TablesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 25779 Accepted: 8576DescriptionThe famous ACM (Advanced Computer Maker) Company has rented原创 2014-08-04 15:52:53 · 208 阅读 · 0 评论