![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM
文章平均质量分 64
huaxiangsl
计算机软件
展开
-
HDU AC题目小总结
1181 变形课 http://acm.hdu.edu.cn/showproblem.php?pid=1181 floyd算法,闭包传递,仔细体会floyd算法不难解出 1162 Eddy's picture http://acm.hdu.edu.cn/showproblem.php?pid=1162 很明显的 最小生成树 问题原创 2010-07-28 13:47:00 · 595 阅读 · 1 评论 -
HDU 2555 人人都能参加第30届校田径运动会了 数学模拟
人人都能参加第30届校田径运动会了 Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 2 Accepted Submission(s) : 2Font: Times New Roman | Verdana | Georgia原创 2010-10-17 21:44:00 · 814 阅读 · 0 评论 -
HDOJ 2645 find the nearest station BFS
find the nearest station Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 2 Accepted Submission(s) : 2Font: Times New Roman | Verdana | Geo原创 2010-10-17 21:41:00 · 588 阅读 · 0 评论 -
HDOJ 2897 博弈
邂逅明下Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 541 Accepted Submission(s): 261Problem Description当日遇到月,于是有了明。当我遇到了你,便成了侣。那天,原创 2010-10-17 19:31:00 · 535 阅读 · 0 评论 -
HDOJ 2095 find your present (2)
应该是很简单的水题,不过再简单思路不对也是白搭 第一感觉,很不幸,Memory Limit Exceeded 版本 #include using namespace std;int num[1000001];int main(){ int n,temp,i,m; while(scanf("%d",&n)&&n) { memset原创 2010-08-03 19:21:00 · 733 阅读 · 0 评论 -
dijkstra
#include#define N 110#define max 999999int g[N][N];int dijkstra(int s,int n){ int i,j,u,min,dis[N],mark[N]; for(i=0;i { mark[i]=0; dis[i]=g[s][i]; }原创 2010-07-29 11:59:00 · 350 阅读 · 0 评论 -
【细节决定成败】 HDU 最容易犯的错误 持续更新。。。
HDU 2023 以后给变量命名尽量用有意义的字符,什么m,n啊,a[xx],b[xx],c[XX]啊,最容易弄错,刚才就是误把c[x]写成了b[x] 浪费时间 20’HDU 1200 很简单的水题,处理简单的字符串,但是在模拟示例的输入输出的时候潜意识里把每个字符的宽度弄成了和示例一样 即 ch原创 2010-07-21 14:56:00 · 368 阅读 · 0 评论 -
图论 笔记(一) kruskal算法 求最小生成树
kruskal算法思想: 既每次把权值最小边的点加入到U集合中(当然不能构成环),到最后必然只剩下一颗树,这时说明最小树已经生成完毕/* kruskal算法 求最小生成树 */#include #include #include #define ARRAYNUM 6 // 图的顶点数 #define MAXIMUMCOST 999 // 若两个点不相连则距离为原创 2010-07-21 00:31:00 · 460 阅读 · 0 评论 -
HDU 1195 Open the Lock 暴力过法 DHOJ 1195
题目链接如下 http://acm.hdu.edu.cn/showproblem.php?pid=1195 Problem DescriptionNow an emergent task for you is to open a password lock. The password is consisted of four digits. Each digit is numb原创 2010-07-21 00:21:00 · 6379 阅读 · 0 评论 -
HDOJ 1004 Let the Balloon Rise
Problem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest i原创 2010-06-25 23:30:00 · 671 阅读 · 0 评论 -
DHOJ1005 HDU1005 Number Sequence
Problem DescriptionA number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are to calculate the value of f(n).原创 2010-06-25 23:26:00 · 975 阅读 · 0 评论 -
类型转换 HDOJ 1013 Digital Roots
题目如下 http://acm.hdu.edu.cn/showproblem.php?pid=1013 题目分析相当简单,不多说,这里要记录的是一点点小技巧按题目意思,必须要将输入的数字拆分成个位数,然后相加,如果结果是个位数即输入结果,不是则继续拆分 所以这里涉及到,拆分数字。。。 itoa是广泛应用的非标准C语言扩展函数。由于它不是标准C语言函数,所以不能在所有原创 2010-07-20 16:32:00 · 770 阅读 · 0 评论 -
HDOJ 2100 Lovekey HDU 2100 Lovekey
HDOJ 2100 Lovekey HDU 2100 Lovekey http://acm.hdu.edu.cn/showproblem.php?pid=2100 题目不难,模拟算26进制的加法 当然还是有很大的优化的空间的 // s1 s2为加数 ss保存结果(int型) xx保存最终结果// 最后一位对齐,每一位相加 ,#inclu原创 2010-07-30 23:24:00 · 842 阅读 · 0 评论 -
HDOJ 1232 畅通工程 并查集 HDU 1232
畅通工程 Time Limit : 4000/2000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 0 Accepted Submission(s) : 0Font: Times New Roman | Verdana | GeorgiaFont Size: ←原创 2010-08-12 19:21:00 · 798 阅读 · 0 评论 -
HDOJ 1856 More is better 简单的并查集算法
Problem DescriptionMr Wang wants some boys to help him with a project. Because the project is rather complex,the more boys come, the better it will be. Of course there are certain requirements.原创 2010-08-11 11:39:00 · 1111 阅读 · 0 评论 -
HDOJ 1829 A Bug's Life 并查集
并查集的加强训练题目如下:Problem DescriptionBackground Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only原创 2010-08-11 11:35:00 · 929 阅读 · 0 评论