- 博客(189)
- 资源 (4)
- 收藏
- 关注
原创 hdu 2066 一个人的旅行 最短路 dijkstra 解题报告
Problem Description虽然草儿是个路痴(就是在杭电待了一年多,居然还会在校园里迷路的人,汗~),但是草儿仍然很喜欢旅行,因为在旅途中 会遇见很多人(白马王子,^0^),很多事,还能丰富自己的阅历,还可以看美丽的风景……草儿想去很多地方,她想要去东京铁塔看夜景,去威尼斯看电影,去阳明山上看海芋,去纽约纯粹看雪景,去巴黎喝咖啡写信,去北京探望孟姜女……眼看寒假就快到了,这么一大
2016-07-28 12:16:37 312
原创 hdu 5547 Sudoku dfs 暴力回溯 解题报告
Problem DescriptionYi Sima was one of the best counselors of Cao Cao. He likes to play a funny game himself. It looks like the modern Sudoku, but smaller.Actually, Yi Sima was playing it diffe
2016-07-25 14:21:56 422
原创 团体程序设计天梯赛-练习集 L1-009. N个数求和 重载+运算符 解题报告
L1-009. N个数求和时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者陈越本题的要求很简单,就是求N个数字的和。麻烦的是,这些数字是以有理数“分子/分母”的形式给出的,你输出的和也必须是有理数的形式。
2016-07-24 11:30:54 758
原创 poj 1062 昂贵的婚礼 最短路 dijkstra 解题报告
Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。"探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币
2016-07-23 16:10:01 775
原创 poj 2337 Catenyms 欧拉回路+dfs 解题报告
CatenymsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11494 Accepted: 2982DescriptionA catenym is a pair of words separated by a period such that th
2016-07-22 15:17:14 363
原创 团体程序设计天梯赛-练习集 L3-010. 是否完全二叉搜索树
L3-010. 是否完全二叉搜索树时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者陈越将一系列给定数字顺序插入一个初始为空的二叉搜索树(定义为左子树键值大,右子树键值小),你需要判断最后的树是否一棵完全二
2016-07-20 12:20:25 584
原创 mysql 批量修改某一个字符串 加前缀,后缀
update a set img = concat('23232', id, '.JPG')表示img字段设置为23232 + id +.JPG
2016-07-11 19:58:39 3484
原创 hdu 4751 Divide Groups bfs 搜索 解题报告
Divide GroupsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1969 Accepted Submission(s): 708Problem Description This ye
2016-07-10 21:11:44 291
原创 hdu 4296 Buildings 贪心 解题报告
BuildingsTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3457 Accepted Submission(s): 1291Problem Description Have you ever
2016-07-10 19:47:48 801 1
原创 hdu 4774 Stealing Harry Potter's Precious 状态压缩+bfs 解题报告
Stealing Harry Potter's PreciousTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3065 Accepted Submission(s): 1374Problem Descript
2016-07-10 17:19:05 540
原创 hdu 4647 Another Graph Game 贪心 解题报告
Another Graph GameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1938 Accepted Submission(s): 748Problem DescriptionAlice an
2016-07-10 14:21:18 363
原创 hdu 4415 Assassin’s Creed 贪心 解题报告
Assassin’s CreedTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2617 Accepted Submission(s): 599Problem DescriptionEzio Audit
2016-07-10 12:23:59 457
原创 hdu 4740 The Donkey of Gui Zhou dfs 搜索 解题报告
The Donkey of Gui ZhouTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1930 Accepted Submission(s): 646Problem DescriptionTher
2016-07-09 17:45:20 336
原创 hdu 4544 湫湫系列故事——消灭兔子 贪心+优先队列 解题报告
湫湫系列故事——消灭兔子Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 2332 Accepted Submission(s): 773Problem Description 湫湫减肥 越减越肥
2016-07-09 16:28:34 366
原创 hdu 4550 卡片游戏 贪心 解题报告
卡片游戏Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1897 Accepted Submission(s): 567Problem Description 小明最近宅在家里无聊,于是他发明了一种有
2016-07-09 15:13:26 615
原创 hdu 4527 小明系列故事——玩转十滴水 bfs 解题报告
小明系列故事——玩转十滴水Time Limit: 500/200 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 705 Accepted Submission(s): 275Problem Description 小明最近喜欢上了一个名为十滴
2016-07-08 18:11:35 631
原创 hdu 4528 小明系列故事——捉迷藏 bfs 解题报告
小明系列故事——捉迷藏Time Limit: 500/200 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1410 Accepted Submission(s): 393Problem Description 小明的妈妈生了三个孩子,老大叫
2016-07-08 16:54:30 591
原创 java 排序算法 折半 堆 希尔 快速 整理
试题1:折半查找折半查找是在有序表中,把待查找数据值与查找范围的中间元素值进行比较,会有三种情况出现: 1)待查找数据值与中间元素值正好相等,则放回中间元素值的索引。 2)待查找数据值比中间元素值小,则以整个查找范围的前半部分作为新的查找范围,执行1),直到找到相等的值。 3)待查找数据值比中间元素值大,则以整个查找范围的后半部分作为新的查找范围
2016-06-30 16:22:23 1839
原创 XTU 1250 Super Fast Fourier Transform 暴力 解题报告
Bobo has two sequences of integers {a1,a2,…,an} and {b1,b2,…,bm}. He would like to find∑i=1n∑j=1m⌊|ai−bj|−−−−−−−√⌋.Note that ⌊x⌋ denotes the maximum integer does not exceed x, and |x|
2016-06-18 17:17:46 616
原创 poj 1679 The Unique MST 判断最小生成树是否唯一 解题报告
DescriptionGiven a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of
2016-06-10 16:37:18 417
原创 hdu 1598 find the most comfortable road 枚举+最小成生树 kruskal 解题报告
Problem DescriptionXX星有许多城市,城市之间通过一种奇怪的高速公路SARS(Super Air Roam Structure---超级空中漫游结构)进行交流,每条SARS都对行驶在上面的Flycar限制了固定的Speed,同时XX星人对 Flycar的“舒适度”有特殊要求,即乘坐过程中最高速度与最低速度的差越小乘坐越舒服 ,(理解为SARS的限速要求,flycar必须瞬
2016-06-08 15:00:36 340
原创 hdu 3367 Pseudoforest (伪森林) not 最大生成树 解题报告
Problem DescriptionIn graph theory, a pseudoforest is an undirected graph in which every connected component has at most one cycle. The maximal pseudoforests of G are the pseudoforest subgraphs of
2016-06-07 21:48:15 603
原创 FZU 1009 Jogging Trails 最短路+欧拉回路 解题报告
Problem DescriptionGord is training for a marathon. Behind his house is a park with a large network of jogging trails connecting water stations. Gord wants to find the shortest jogging route that tr
2016-06-07 18:19:41 1944
原创 团体程序设计天梯赛-练习集 L3-003 社交集群 并查集 解题报告
L3-003. 社交集群时间限制1000 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者陈越在社交网络平台注册时,用户通常会输入自己的兴趣爱好,以便找到和自己兴趣相投的朋友。有部分兴趣相同的人们就形成了“社交集群”。现
2016-06-01 17:17:47 1547 1
原创 团体程序设计天梯赛-练习集 L2-001 紧急救援 dijkstra 解题报告
L2-001. 紧急救援时间限制200 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者陈越作为一个城市的应急救援队伍的负责人,你有一张特殊的全国地图。在地图上显示有多个分散的城市和一些连接城市的快速道路。每个城市的救援
2016-06-01 15:20:00 1873
原创 团体程序设计天梯赛-练习集 L2-002 链表去重 解题报告
L2-002. 链表去重时间限制300 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者陈越给定一个带整数键值的单链表L,本题要求你编写程序,删除那些键值的绝对值有重复的结点。即对任意键值K,只有键值或其绝对值等于K的第
2016-06-01 09:04:44 2372
原创 hdu 2544 最短路 Bellman_Ford 解题报告
代码:#include #include #include #include #include #include using namespace std;#define MAXN 200010#define INF 0x3f3f3f3fstruct edge{ int from, to, cost;};edge es[MAXN];int n, m, d[MAX
2016-05-24 19:13:00 289
原创 hhu 5177 旅游路线 floyd 解题报告
描述 中国的城市有很多,我们选取其中N个城市,城市之间有一些双向的路来连接,现在想找一条旅游路线,路线从X点出发并且最后回到X点,而且不能重复经过同一个城市,且至少走了2个城市以上。现在小A需要你帮他找一条这样的路线,并且花费越少越好。输入第一行是2个整数N和M(N 接下来的M行里,每行包括3个整数a,b,c.代表a和b之间有一条通路,并且
2016-05-24 18:42:44 10715
原创 hdu 3631 Shortest Path floyd 解题报告
Problem DescriptionWhen YY was a boy and LMY was a girl, they trained for NOI (National Olympiad in Informatics) in GD team. One day, GD team’s coach, Prof. GUO asked them to solve the following s
2016-05-23 21:32:48 359
原创 poj 2204 hdu 1217 Arbitrage spfa判环 解题报告
Problem DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that 1 US
2016-05-23 20:08:37 359
原创 poj 3259 Wormholes spfa判断负环 解题报告
DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination a
2016-05-23 19:09:24 680
原创 HHU 3919 Travel spfa与dijkstra 解题报告
描述There are N cities in this country, and some of them are connected by roads. Given two cities, can you find the shortest distance between them?输入The first line contains the number of t
2016-05-23 11:06:55 298
原创 hdu 2544 最短路 spfa 解题报告
Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗? Input输入包括多组数据。每组数据第一行是两个整数N、M(N输入保证至少存在1条商店到赛场的路线。
2016-05-23 10:40:38 433
原创 poj 2367 Genealogical tree 拓扑排序 解题报告
DescriptionThe system of Martians' blood relations is confusing enough. Actually, Martians bud when they want and where they want. They gather together in different groups, so that a Martian can h
2016-05-11 15:16:58 534
原创 poj 1984 Navigation Nightmare 并查集 解题报告
DescriptionFarmer John's pastoral neighborhood has N farms (2 <= N <= 40,000), usually numbered/labeled 1..N. A series of M (1 <= M < 40,000) vertical and horizontal roads each of varying lengths
2016-05-10 10:28:30 884
原创 acm 头文件及宏定义
#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define lson 2*i #define rso
2016-05-05 19:21:39 2087
原创 整数大数模拟 高精度加法 高精度减法 高精度乘法 高精度除法 c/c++ java
整数大数模拟 高精度加法 高精度减法 高精度乘法 高精度除法 c/c++ java大数加法 大数减法 大数除法 大数乘法
2016-05-04 15:09:48 2421
原创 hdu Magic maze bfs+优先队列 解题报告
Problem Description 天外来客 likes playing computer game very much. Recently, he is playing a RPG game called “仙剑奇侠传4”. But when he was playing the game, he meets a very mad problem. There are so many
2016-04-16 15:04:42 452
原创 hdu 1180 诡异的楼梯 bfs+优先队列 解题报告
诡异的楼梯Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 12107 Accepted Submission(s): 2988Problem DescriptionHogwarts正式开学以后,Har
2016-04-11 15:45:35 346
graphviz-2.38.msi(windows下python图形工具)
2019-03-01
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人