1 2 3 4 5 ··· 7 下一页
摘要: 对于还不明白Dijkstra算法的可以到网上随便搜一下,有大量的资料,同时也可以参看我的另一篇博客:http://blog.csdn.net/doufei_ccst/article/details/7841311,在这篇博客中是以邻接矩阵来实现Dijkstra算法的。用邻接链表数据结构存储的图的Dijstra算法的实现代码可以参看我的代码分享:https://github.com/crazykeyboard/Graph-AdjList-Dijkstra 阅读全文
posted @ 2013-10-17 23:51 dancingrain 阅读(536) 评论(0) 推荐(0) 编辑
摘要: 从网上看到网易有道2014届校园招聘的笔试题目,简单的做了一下编程和算法部分,都是一些平常遇到的题目,留一个笔记。总共有两道编程题目和一个算法题目,编程题目要求写出可以运行的C/C++代码或者Java代码,第一个编程题如下:(不是太清楚,但勉强能看)对于这道题,应该是考察对于字符串的处理能力,应该是比较基础的题目。从题目的描述我们可以将要转换的字符串组合分成两大类1,普通的字符串,不进行转换,如例子中的h1(两个尖括号中的内容)2,以&开头并且以;(分号)结尾的的字符串,这类字符串需要按照给定的规则进行转换。该类有可以分成两类1)&后面跟#和数字的UNICODE,需要当做一个U 阅读全文
posted @ 2013-10-16 14:45 dancingrain 阅读(623) 评论(0) 推荐(0) 编辑
摘要: The Pilots Brothers' refrigeratorTime Limit:1000MSMemory Limit:65536KTotal Submissions:16008Accepted:6035Special JudgeDescriptionThe game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a refrigerator.There are 16 handles on the refrigerator door. Ev 阅读全文
posted @ 2013-09-28 22:03 dancingrain 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Flip GameTime Limit:1000MSMemory Limit:65536KTotal Submissions:26203Accepted:11308DescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other one is black and each piece is lying either it's black 阅读全文
posted @ 2013-09-28 17:07 dancingrain 阅读(243) 评论(0) 推荐(0) 编辑
摘要: Rightmost DigitTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 26061Accepted Submission(s): 10018Problem DescriptionGiven a positive integer N, you should output the most right digit of N^N.InputThe input contains several test cases. The first line 阅读全文
posted @ 2013-09-28 11:38 dancingrain 阅读(248) 评论(0) 推荐(0) 编辑
摘要: Humble NumbersTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13689Accepted Submission(s): 5956Problem DescriptionA number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16 阅读全文
posted @ 2013-09-27 21:42 dancingrain 阅读(239) 评论(0) 推荐(0) 编辑
摘要: The Hardest Problem EverTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13447Accepted Submission(s): 6123Problem DescriptionJulius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was keeping himself alive. In 阅读全文
posted @ 2013-09-27 14:53 dancingrain 阅读(269) 评论(0) 推荐(0) 编辑
摘要: As Easy As A+BTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 30295Accepted Submission(s): 12993Problem DescriptionThese days, I am thinking about a question, how can I get a problem as easy as A+B? It is fairly difficulty to do such a thing. Of co 阅读全文
posted @ 2013-09-27 13:08 dancingrain 阅读(349) 评论(0) 推荐(0) 编辑
摘要: The 3n + 1 problemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18197Accepted Submission(s): 6721Problem DescriptionProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). I 阅读全文
posted @ 2013-09-26 22:56 dancingrain 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 最小公倍数Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 27414Accepted Submission(s): 15184Problem Description给定两个正整数,计算这两个数的最小公倍数。Input输入包含多组测试数据,每组只有一行,包括两个不大于1000的正整数.Output对于每个测试用例,给出这两个数的最小公倍数,每个实例输出一行。Sample Input10 14Sample Output70代码如下:#include 阅读全文
posted @ 2013-09-25 23:40 dancingrain 阅读(241) 评论(0) 推荐(0) 编辑
1 2 3 4 5 ··· 7 下一页