ACM
文章平均质量分 88
Jetman13
居然有兴趣就要坚持到底
展开
-
HDU考试排名
#include #include #include struct student { char name[12]; int title; int time; }stu[1001]; int cmp(const void* a,const void* b) { struct student* c=(struct student*)a; struct stude原创 2013-02-16 12:07:41 · 639 阅读 · 0 评论 -
hdu4576Robot
Robot Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 102400/102400 K (Java/Others) Total Submission(s): 1783 Accepted Submission(s): 655 Problem Description Michael has a telec原创 2013-10-16 10:27:13 · 937 阅读 · 0 评论 -
hdu4568Hunter(BFS+TSP)
Hunter Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 725 Accepted Submission(s): 200 Problem Description One day, a hunter n原创 2013-10-21 20:41:09 · 1695 阅读 · 0 评论 -
poj1836 Alignment
简单的双向lis。。原创 2013-10-31 19:56:11 · 702 阅读 · 0 评论 -
poj1260Pearls
简单的动态规划原创 2013-11-01 22:01:33 · 846 阅读 · 0 评论 -
hdu4786Fibonacci Tree
Fibonacci Tree Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 38 Accepted Submission(s): 21 Problem Description Coach Pang is原创 2013-11-17 16:15:59 · 836 阅读 · 0 评论 -
hdu4771Stealing Harry Potter's Precious
2013ACM杭州赛区现场赛B题。最短路径加枚举~~~原创 2013-11-09 21:11:02 · 2248 阅读 · 0 评论 -
hdu4770Lights Against Dudely
Lights Against Dudely Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 362 Accepted Submission(s): 119 Problem Description Harry: "Bu原创 2013-11-12 12:38:53 · 1800 阅读 · 0 评论 -
The 2013 ACM-ICPC Asia Changsha Regional Contest C Zoj Collision
Collision Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge There's a round medal fixed on an ideal smooth table, Fancy is trying to throw some coins and make them slip tow原创 2013-11-27 08:55:58 · 1908 阅读 · 5 评论 -
The 2013 ACM-ICPC Asia Changsha Regional Contest J Josephina and RPG
Josephina and RPG Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge A role-playing game (RPG and sometimes roleplaying game) is a game in which players assume the roles of c原创 2013-11-27 19:24:40 · 1786 阅读 · 0 评论 -
hdu 3033 I love sneakers!
I love sneakers! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3340 Accepted Submission(s): 1361 Problem Description After mon原创 2013-12-21 15:21:05 · 1090 阅读 · 0 评论 -
Codeforces Round #218 (Div. 2) E. Subway Innovation
E. Subway Innovation time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Berland is going through tough times —原创 2014-01-10 15:59:13 · 1129 阅读 · 0 评论 -
菜鸟acm新篇章^-^F,G题
F题 题意:中文题,自己看!! 题解:这道题最常规的解法是对于每一袋米都可以有两个尝试:选择或者不选择。那就会有2^N种可能。一直选到自己的钱满了。。 然后每次更新最大值。。 这种解法是没错,但是N是可以达到1000*20.。。这绝对是Time Limit Exceeded。不可能Accepted。 所以现在算法的重要性就体现出来了。。 01背包问题。。 dp[i]代表有i的钱数最多原创 2014-01-08 19:44:30 · 886 阅读 · 0 评论 -
ZOJ Monthly, January 2014 E Diagonal (浙江大学月赛)
Diagonal Time Limit: 2 Seconds Memory Limit: 65536 KB Alice is very interested in the algorithm. He finds a interesting book called "Algorithmic puzzles" which contains more than 100 puz原创 2014-01-27 09:48:41 · 2050 阅读 · 2 评论 -
ZOJ Monthly, January 2014 F The Three Guys (浙江大学月赛)
The Three Guys Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge Recent days, a joke spread out among Chinese social networks. "If Yao Ming, Guo Jingming and He Jiong lyin原创 2014-01-27 10:02:04 · 1536 阅读 · 2 评论 -
uva 10003- Cutting Sticks (记忆化搜索)
Cutting Sticks You have to cut a wood stick into pieces. The most affordable company, The Analog Cutting Machinery, Inc. (ACM), charges money according to the length of the stick being cut原创 2014-02-04 18:34:48 · 1351 阅读 · 0 评论 -
uva11825 Hackers' Crackdown
Problem H Hackers’ Crackdown Input: Standard Input Output: Standard Output Miracle Corporations has a number of system services running in a distributed computer system which is a prime targ原创 2014-03-27 16:02:13 · 883 阅读 · 0 评论 -
hdu1176免费馅饼(dp)
免费馅饼 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 23808 Accepted Submission(s): 8025 Problem Description 都说天上不会掉馅饼,但有一天gamebo原创 2014-04-26 21:29:02 · 925 阅读 · 0 评论 -
poj1011木棒
老实说,我做这道题时关于那些剪枝都是看了师兄的博客然后慢慢研究每一条语句,才发现意义深厚,很多都是我想不到但又实际可行的剪枝让我佩服不已~~,不过我这道能在poj上过是因为它的测试数据很水,而下面一组用例就不只用了1s了~~~ /* 9 5 2 1 5 2 1 5 2 1 4 1 2 3 4 12 1 1 2 2 2 3 3 3 3 3 3 4 27 15原创 2013-05-27 16:28:55 · 992 阅读 · 0 评论 -
hdu1501 Zipper
简单的DFS+记忆化搜索!! 刚做这题时,我没花多长时间就写出来了。。 但是TLE~~~ 后来再看一下牛人的解题报告,发现自己的代码就和别人相差两行!!!杯具~~ 不过有些吧搜索倒过来就能A。。那是因为数据弱~~~ #include #include #include char a[202],b[202],aim[404]; int alen,blen,clen,dp[202][原创 2013-08-08 21:16:02 · 850 阅读 · 0 评论 -
1860Currency Exchange
Bellman-Ford算法~~~~~ Bellman-Ford算法描述: 1,.初始化:将除源点外的所有顶点的最短距离估计值 d[v] ←+∞, d[s] ←0; 2.迭代求解:反复对边集E中的每条边进行松弛操作,使得顶点集V中的每个顶点v的最短距离估计值逐步逼近其最短距离;(运行|v|-1次) 3.检验负权回路:判断边集E中的每一条边的两个端点是否收敛。如果存在未收敛的顶点,则原创 2013-02-16 12:14:37 · 488 阅读 · 0 评论 -
poj 3083
#include #include char maze[42][42]; int s_l,s_r,e_l,e_r,w,h,s_f; vist[42][42]; struct queue { int line,row,depth; }queue[1603]; int work_l() { int i,j,l,r; l=s_l; r=s_r; j=s_f; for(i=1;;i++)原创 2013-05-27 16:18:11 · 629 阅读 · 0 评论 -
POJ1101The Game
刚刚接触做这道题时,我也被那副"连连看"吓了一下,不过慢慢地分析才发现这道题也很简单,可能是测试数据太水了吧~~~不过我是一次做对(但不是一次ac,因为有两次PE。。。。。。 不过做这道题需要注意的是,它的行和列是调换了。。注意。。。 #include #include int flag[77][77]; int w,h; struct queue { int x; i原创 2013-05-28 19:41:49 · 879 阅读 · 0 评论 -
hdu1010 Tempter of the Bone 成长---纠错
这几天遇到一道比较简单的dfs+小小剪枝。但我就是做了两天,唉~~硬伤丫 而且是写错变量名!! 最主要是写错变量名很多测试用例都能过。。。。。 /* 546MS 288K */ #include #include #include char maze[10][10]; int a[] = {-1,0,1,0}; int b[] = {0,1,0,-1}; int w,h,Starti,Sta原创 2013-08-05 11:37:40 · 676 阅读 · 0 评论 -
hdu1495非常可乐
非常可乐 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3649 Accepted Submission(s): 1520 Problem Description 大家一定觉的运动以后喝可乐是一件很惬意的事情,但是原创 2013-08-24 23:17:11 · 927 阅读 · 1 评论 -
poj1077Eight
Eight Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 21880 Accepted: 9674 Special Judge Description The 15-puzzle has been around for over 100 years;原创 2013-08-30 16:57:47 · 879 阅读 · 1 评论 -
poj1094Sorting It All Out
刚遇到这道题时我就想着把它建立成一个图,然后每输入一条边就就深度遍历一下。 判断是否有环和是否能判断出大小顺序。。。 但是之后才知道一般递归都很耗时间。。。 尽管我加入了几个强大的剪枝。而且在discuss里面的数据都通过了。 不过还是超时。。。。 我特别注明一下,下面的代码是超时的代码额!! 希望大神能帮我修改一下ac。。小弟感激不尽!!! #include #include原创 2013-09-06 17:50:51 · 657 阅读 · 0 评论 -
hdu4708Rotation Lock Puzzle
Rotation Lock Puzzle Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 622 Accepted Submission(s): 179 Problem Description Alice w原创 2013-09-10 11:49:10 · 1331 阅读 · 2 评论 -
hdu4715Difference Between Primes
Difference Between Primes Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 894 Accepted Submission(s): 290 Problem Description Al原创 2013-09-10 12:05:38 · 941 阅读 · 0 评论 -
poj1185炮兵阵地
炮兵阵地 Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 16155 Accepted: 6142 Description 司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原创 2013-09-05 12:08:14 · 704 阅读 · 0 评论 -
poj1088滑雪
滑雪 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 68914 Accepted: 25425 Description Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等原创 2013-09-12 10:19:14 · 693 阅读 · 0 评论 -
hdu1171Big Event in HDU
Big Event in HDU Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 19403 Accepted Submission(s): 6785 Problem Description Nowaday原创 2013-10-02 20:59:03 · 855 阅读 · 0 评论 -
hdu4526威威猫系列故事——拼车记
威威猫系列故事——拼车记 Time Limit: 500/200 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 1001 Accepted Submission(s): 309 Problem Description 话说威威猫有一次去参加比赛,原创 2013-09-18 10:29:48 · 1662 阅读 · 0 评论 -
hdu2424Gary's Calculator
Gary's Calculator Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 857 Accepted Submission(s): 188 Problem Description Gary has f原创 2013-10-03 20:37:31 · 1000 阅读 · 0 评论 -
hdu2425Hiking Trip
Hiking Trip Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1159 Accepted Submission(s): 511 Problem Description Hiking in the m原创 2013-10-03 18:24:18 · 945 阅读 · 0 评论 -
hdu1166敌兵布阵
敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 32178 Accepted Submission(s): 13823 Problem Description C国的死对头A国这段时间正在进行军事演原创 2013-10-05 14:31:38 · 931 阅读 · 0 评论 -
poj2492A Bug's Life(并查集详解)
研究了两天终于搞懂了并查集皮毛原创 2013-10-10 14:31:35 · 1332 阅读 · 0 评论 -
Fighting For 2014 (One University One Question) Round II [E] New Year 2014
[E] New Year 2014 时间限制: 2000 ms 内存限制: 262144 K 问题描述 In the New Year 2014, Xiao Ming is thinking about the question: give two integers N and K, Calculate the number of the numbers of satisfy t原创 2014-02-14 19:46:44 · 1082 阅读 · 1 评论