摘要: Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Submit Status Description 某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从 阅读全文
posted @ 2016-08-04 16:15 菜鸟龙* 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Submit Status Description 1967年,美国著名的社会学家斯坦利·米尔格兰姆提出了一个名为“小世界现象(sma 阅读全文
posted @ 2016-08-04 15:43 菜鸟龙* 阅读(261) 评论(0) 推荐(0) 编辑
摘要: Description 985有n个数,已知每次操作可以将其中不相同的两个数一个加一、一个减一,操作次数不限。 问他最多可以得到多少个相同的数。 985有n个数,已知每次操作可以将其中不相同的两个数一个加一、一个减一,操作次数不限。 问他最多可以得到多少个相同的数。 Input 第一行输入一个整数t 阅读全文
posted @ 2016-08-03 20:52 菜鸟龙* 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Description 省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公路的若干条道路的成本。现请你编写程序,计算出全省畅通需要的最低成本。 Description 省政府“畅通工 阅读全文
posted @ 2016-08-03 20:16 菜鸟龙* 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 1 #include<cstdio> 2 #include<algorithm> 3 using namespace std; 4 int per[111],n; 5 struct node{ 6 int a,b; 7 int dis; 8 }x[5005]; 9 bool cmp(node a,n 阅读全文
posted @ 2016-08-03 11:19 菜鸟龙* 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu Submit Status Submit Status Description If an integer is not divisible by 2 or 5, s 阅读全文
posted @ 2016-07-30 17:24 菜鸟龙* 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 什么时候用DFS,什么时候用BFS? 二维数组的题目,N小于20的,适用DFS。而一般 N<= 200,N<=1000这种,一定不可能用DFS去做。而且并不只是整个题目不能用DFS,其中的每一步也不能使用DFS。 BFS的基本步骤 1.将初始点(一个或多个)加入一个集合尾 2.从集合头取出点,判断初 阅读全文
posted @ 2016-07-29 20:45 菜鸟龙* 阅读(1627) 评论(0) 推荐(2) 编辑
摘要: Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu Submit Status Submit Status Description You are trapped in a 3D dungeon and need to 阅读全文
posted @ 2016-07-29 20:39 菜鸟龙* 阅读(312) 评论(0) 推荐(0) 编辑
摘要: Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Submit Status Description Angel was caught by the MOLIGPY! He was p 阅读全文
posted @ 2016-07-29 19:51 菜鸟龙* 阅读(205) 评论(0) 推荐(0) 编辑
摘要: Description The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangula 阅读全文
posted @ 2016-07-28 20:18 菜鸟龙* 阅读(140) 评论(0) 推荐(0) 编辑