摘要: 寒假的第二周,弥补了一下图论算法。在这里做一下总结,主要针对近期学到的一些建模技巧,同时也非常感谢有朋友能够给出图论算法相关的精彩讲解或者知识链接。算法总结:欧拉回路问题:判断图是否存在欧拉回路或者欧拉通路,输出一条欧拉回路。学习Fleury算法输出一条欧拉回路。 1 /* G是连通无向图,则称经过... 阅读全文
posted @ 2015-02-09 20:14 huangxf 阅读(2013) 评论(0) 推荐(2) 编辑
摘要: POJ图论分类【转】 一个很不错的图论分类,非常感谢原版的作者!!!在这里分享给大家,爱好图论的ACMer不寂寞了。。。 (很抱歉没有找到此题集整理的原创作者,感谢知情的朋友给个原创链接)POJ:http://poj.org/1062* 昂贵的聘礼 枚举等级限制+dijkstra1087* A ... 阅读全文
posted @ 2015-02-07 17:26 huangxf 阅读(671) 评论(1) 推荐(1) 编辑
摘要: 通过身边小事解释机器学习是什么一个给不知道机器学习是什么东西的人讲的一个挺不错的例子,方法。今天从quora上看了一个问题:如何给不是CS的学生,给不知道机器学习和数据挖掘的学生,讲明白什么是机器学习和数据挖掘。其中有个答案很不错,拿买芒果的例子来给大家解释。老师们也应该多用用类似的一些例子,启发下... 阅读全文
posted @ 2015-06-08 19:15 huangxf 阅读(534) 评论(0) 推荐(3) 编辑
摘要: 题目链接:C. Soldier and CardsTwo bored soldiers are playing card war. Their card deck consists of exactlyncards, numbered from1ton,all values are differen... 阅读全文
posted @ 2015-05-23 10:38 huangxf 阅读(550) 评论(0) 推荐(0) 编辑
摘要: 题目链接:HDU - 1512Once in a forest, there lived N aggressive monkeys. At the beginning, they each does things in its own way and none of them knows each ... 阅读全文
posted @ 2015-05-21 17:51 huangxf 阅读(559) 评论(0) 推荐(1) 编辑
摘要: 题目链接:HDU - 1599杭州有N个景区,景区之间有一些双向的路来连接,现在8600想找一条旅游路线,这个路线从A点出发并且最后回到A点,假设经过的路线为V1,V2,....VK,V1,那么必须满足K>2,就是说至除了出发点以外至少要经过2个其他不同的景区,而且不能重复经过同一个景区。现在860... 阅读全文
posted @ 2015-05-09 22:20 huangxf 阅读(505) 评论(0) 推荐(0) 编辑
摘要: 题目链接:HDU - 4826度度熊是一只喜欢探险的熊,一次偶然落进了一个m*n矩阵的迷宫,该迷宫只能从矩阵左上角第一个方格开始走,只有走到右上角的第一个格子才算走出迷宫,每一次只能走一格,且只能向上向下向右走以前没有走过的格子,每一个格子中都有一些金币(或正或负,有可能遇到强盗拦路抢劫,度度熊身上... 阅读全文
posted @ 2015-05-07 18:30 huangxf 阅读(354) 评论(0) 推荐(0) 编辑
摘要: 题目链接:HDU - 1556N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a 2 #include 3 #include 4 #include 5 #include 6 #include 7 #define inf 0x7fffffff 8 using nam... 阅读全文
posted @ 2015-05-01 00:42 huangxf 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 题目链接:HDU - 1506A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may h... 阅读全文
posted @ 2015-04-27 00:15 huangxf 阅读(505) 评论(0) 推荐(0) 编辑
摘要: 题目链接:UVA - 11134题意描述:在一个n*n(1 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #define inf 0x7fffffff 9 using namespace std;10 cons... 阅读全文
posted @ 2015-04-26 13:11 huangxf 阅读(1194) 评论(0) 推荐(1) 编辑
摘要: 题目链接:UVA - 103题意:现有k个箱子,每个箱子可以用n维向量表示。如果一个箱子的n维向量均比另一个箱子的n维向量大,那么它们可以套接在一起,每个箱子的n维向量可以互相交换值,如箱子(2,6)可以和箱子(7,3)套接在一起。求出套接的箱子最多的个数前提下任意一种解决方案。算法:抛开n维不看,... 阅读全文
posted @ 2015-04-26 11:34 huangxf 阅读(357) 评论(0) 推荐(0) 编辑
摘要: 题目链接: HDU - 1501Given three strings, you are to determine whether the third string can be formed by combining the characters in the first two strings.... 阅读全文
posted @ 2015-04-18 23:46 huangxf 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 题目链接:HDU - 5206Young F found a secret record which inherited from ancient times in ancestral home by accident, which named "Four Inages Strategy". He ... 阅读全文
posted @ 2015-04-18 21:38 huangxf 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 题目链接:HDU - 1500In China, people use a pair of chopsticks to get food on the table, but Mr. L is a bit different. He uses a set of three chopsticks -- ... 阅读全文
posted @ 2015-04-18 01:48 huangxf 阅读(400) 评论(0) 推荐(0) 编辑
摘要: 题目链接:HDU - 1015=== Op tech briefing, 2002/11/02 06:42 CST ==="The item is locked in a Klein safe behind a painting in the second-floor library. Klein ... 阅读全文
posted @ 2015-04-17 23:50 huangxf 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 题目链接:CF - 535CKarafs is some kind of vegetable in shape of an1 × hrectangle. Tavaspolis people love Karafs and they use Karafs in almost any kind of f... 阅读全文
posted @ 2015-04-16 02:19 huangxf 阅读(621) 评论(0) 推荐(0) 编辑
摘要: 题目链接:HDU - 3062有n对夫妻被邀请参加一个聚会,因为场地的问题,每对夫妻中只有1人可以列席。在2n 个人中,某些人之间有着很大的矛盾(当然夫妻之间是没有矛盾的),有矛盾的2个人是不会同时出现在聚会上的。有没有可能会有n 个人同时列席?Inputn: 表示有n对夫妻被邀请 (n 2 #i... 阅读全文
posted @ 2015-04-15 10:29 huangxf 阅读(226) 评论(0) 推荐(0) 编辑