HDU
A__yes
这个作者很懒,什么都没留下…
展开
-
杭电OJ-1874_畅通工程续
暴力破解大法虽好,但是对这倒题并没有啥卵用,我为啥知道,因为我试了,测试数据结果也不错,但是提交就会 "堆栈溢出" 查了一下,因为递归太深最后老老实实的用Dijkstra和Floyd算法A.Dijkstra算法(单源) 1.找出从源点能到达的所有的节点,从中选出距离最短的节点并标记一下,下次不再考虑该节点 2.根据上一步中找出的节点,计算出从源点经过该点能到达的所有的节点的距离并与原数据比较,原数据为-1或比原数据小,更新 3.循环n-1次B.Floyd算法(多原创 2015-07-25 20:01:05 · 771 阅读 · 0 评论 -
杭电OJ-2093_考试排名
考试排名Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10800 Accepted Submission(s): 3825Problem DescriptionC++编程考试使用的实时提交系统,具有即时获得成原创 2015-09-04 23:39:02 · 1521 阅读 · 1 评论 -
杭电OJ-1062_Text Reverse
最近几天刷了些水题HDU_OJ: 1001、2000—2011、2039、1720、1062、输入输出格式控制cout 精确到小数点后3位( 0也输出 )(int) (x*100+0.5)/100.0精确到小数点后2位,用double型乘100再转换成int,再除100.0(一定是100.0,不然结果是int型)cout 保留3位有效数字cin>>hex>原创 2015-08-06 18:04:52 · 714 阅读 · 1 评论 -
杭电OJ-2054_A == B ?
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 76226 Accepted Submission(s): 12101Problem DescriptionGive you two numbers A and B,原创 2015-09-03 15:15:44 · 1812 阅读 · 0 评论 -
杭电OJ-2072_单词数
单词数Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 36915 Accepted Submission(s): 8977Problem Descriptionlily的好朋友xiaoou333最近很空,他想了原创 2015-09-03 20:10:51 · 1137 阅读 · 0 评论 -
杭电OJ-2032_杨辉三角
还记得中学时候学过的杨辉三角吗?具体的定义这里不再描述,你可以参考以下的图形:11 11 2 11 3 3 11 4 6 4 11 5 10 10 5 1根据所在行号,列号和左侧数字计算出该数据:该数据=(行号-列号)*左侧数据/列号 (列号为去掉两端 1 后的编号)#include //杨辉三角,(行数-列数)*左侧数值/列数us原创 2015-09-01 20:51:35 · 759 阅读 · 0 评论 -
杭电OJ-1042_N!
求N的阶乘,要算大数,所以要模拟手算#includeusing namespace std;int a[50000],n;int main(){ while (cin >> n) { memset(a,0,50000); a[0] = 1; a[1] = 1; for (int i = 2; i <= n; i++) { for (int j = 1;原创 2015-07-24 18:26:17 · 650 阅读 · 0 评论 -
杭电OJ-1031_Design T-Shirt
Design T-ShirtTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6816 Accepted Submission(s): 3201水题一道题意:讲的是XKA要设计T-Shirt,征原创 2015-07-22 21:14:17 · 751 阅读 · 0 评论 -
杭电OJ-1036_Average is not Fast Enough!
Average is not Fast Enough!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4775 Accepted Submission(s): 1929Problem DescriptionA relay is a race for two or more teams of runners. Each member of原创 2015-07-22 11:21:17 · 624 阅读 · 0 评论 -
杭电OJ-1035_Robot Motion
Problem DescriptionA robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in a grid. The possible instructio原创 2015-07-20 18:24:11 · 749 阅读 · 1 评论 -
杭电OJ-1073_Online Judge
Online JudgeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6197 Accepted Submission(s): 2321题意:比较两个字符串, 完全一样输出Accepted 除去‘ ’ , ‘\t’,‘\n',其它都一样输出Presentation Error else 输出原创 2015-07-31 14:28:32 · 965 阅读 · 0 评论 -
Tempter of the Bone
代码运行时间,不能小于1000ms,很奇怪,1.将字符数组改成整形数组,无效2.将work()的参数由一维整形数组换成整形变量,无效3.将动态申请空间改为静态申请,无效///////////////////////////////////////////////////////最后加了一个return,解决了我觉得应该是加了return后就少做一次if判断///编程要严原创 2015-07-19 22:35:54 · 612 阅读 · 1 评论 -
电梯时间计算
// Z_1008.cpp : 定义控制台应用程序的入口点。//2015-07-13/*The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevato原创 2015-07-18 14:43:23 · 2397 阅读 · 0 评论 -
Javabean(MAX)
// Z_1009.cpp : 定义控制台应用程序的入口点。///*FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean.The warehouse has N rooms.The i原创 2015-07-19 12:04:50 · 438 阅读 · 0 评论 -
杭电OJ-2104_hide handkerchief超简洁代码
#includeusing namespace std;int n, m;;int zz(int a, int b){ return b==0 ? a: zz(b, a%b);}int main(){ while (cin >> n >> m&&n != -1 && m != -1) cout << (nb(n, m) == 1 ? "YES" : "POOR Haha")原创 2015-08-11 19:14:22 · 763 阅读 · 0 评论 -
杭电OJ-2023_求平均成绩
求平均成绩Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 79662 Accepted Submission(s): 19180Problem Description假设一个班有n(n Inpu原创 2015-09-06 21:45:56 · 892 阅读 · 0 评论