上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 24 下一页
摘要: 最短路Time Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 25941Accepted Submission(s): 11174Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗?Input输入包括多组数据。每组数据第一行是两个整数N、M(N#include 阅读全文
posted @ 2014-03-01 11:15 同学少年 阅读(1051) 评论(0) 推荐(0) 编辑
摘要: Problem Description判断两序列是否为同一二叉搜索树序列 Input开始一个数n,(1#include using namespace std;int tr[1024],tr1[1024];//1024的选择要根据元素的个数,极限情况下是所有的节点只有右节点,则节点编号为1->1*2+1(3)->7->15....,每个节点对应一个元素char s[12],s1[12];void insert(int num[],int index,int x)//,数组的编号为树中节点的编号,向二叉树中插入元素{ if(num[index]==-1) num[index]. 阅读全文
posted @ 2014-02-24 16:11 同学少年 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionGive you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisfy the formula Ai+Bj+Ck = X.InputThere are many cases. Every data case is described as followed: In the first line there are 阅读全文
posted @ 2014-02-24 16:07 同学少年 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Problem Description对于输入的每个字符串,查找其中的最大字母,在该字母后面插入字符串“(max)”。Input输入数据包括多个测试实例,每个实例由一行长度不超过100的字符串组成,字符串仅由大小写字母构成。Output对于每个测试实例输出一行字符串,输出的结果是插入字符串“(max)”后的结果,如果存在多个最大的字母,就在每一个最大字母后面都插入"(max)"。Sample InputabcdefgfedcbaxxxxxSample Outputabcdefg(max)fedcbax(max)x(max)x(max)x(max)x(max)Authorlc 阅读全文
posted @ 2014-02-24 15:56 同学少年 阅读(512) 评论(0) 推荐(0) 编辑
摘要: Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?Input测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N ( #include #include using namespace std;int parent[1002];void init(int n)//初始化{ for(int i=1;i>n&&n) { cin>&g 阅读全文
posted @ 2014-02-24 15:54 同学少年 阅读(1296) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionAs the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is the fastest all over the world ^v^). But here comes a problem, there is only one railway where all the 阅读全文
posted @ 2014-02-24 15:46 同学少年 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionThe light travels in a straight line and always goes in the minimal path between two points, are the basic laws of optics.Now, our problem is that, if a branch of light goes into a large and infinite mirror, of course,it will reflect, and leave away the mirror in another direction 阅读全文
posted @ 2014-02-24 15:31 同学少年 阅读(222) 评论(0) 推荐(0) 编辑
摘要: Problem Descriptiongameboy是一个CS高手,他最喜欢的就是扮演警察,手持M4爆土匪的头。也许这里有人没玩过CS,有必要介绍一下“爆头”这个术语:所谓爆头,就是子弹直接命中对方的头部,以秒杀敌人。现在用一个三维的直角坐标系来描述游戏中的三维空间(水平面为xoy平面,z轴正方向是上方)。假设游戏中角色的头是一个标准的球。告诉你土匪的身高,头部半径,所站位置的坐标;gameboy所控警察的身高,头部半径,所站位置的坐标,以及枪头所指方向的单位向量。gameboy所控警察所握的是M4,抢瞄准时枪膛中的子弹跟视线基本同线,我们忽略它们的距离,就当成同线。由于土匪手持AK47,所以 阅读全文
posted @ 2014-02-24 15:04 同学少年 阅读(314) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionOnce upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greedy, that he would not listen to his Architect's proposals to build a beautiful brick wall with a perfect shape and nice tall towers. Inste 阅读全文
posted @ 2014-02-24 14:58 同学少年 阅读(233) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionMany geometry(几何)problems were designed in the ACM/ICPC. And now, I also prepare a geometry problem for this final exam. According to the experience of many ACMers, geometry problems are always much trouble, but this problem is very easy, after all we are now attending an exam, no 阅读全文
posted @ 2014-02-24 14:51 同学少年 阅读(137) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 24 下一页