<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5816115664456228578</id><updated>2026-04-26T04:43:25.584-04:00</updated><category term="Technical - 技术水民"/><category term="Miscellaneous - 杂七杂八"/><category term="Doodle - 乱涂鸦"/><category term="Python"/><title type='text'>月光睡在树梢上</title><subtitle type='html'>我的心，这只野鸟，在你的双眼中找到了天空。&#xa;它们是清晓的摇篮，它们是星辰的王国。&#xa;我的诗歌在它们的深处消失。&#xa;只让我在这天空中高飞，翱翔在静寂的无限空间里。&#xa;只让我冲破它的云层，在它的阳光中展翅吧。</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>66</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-920056178137916237</id><published>2014-11-11T10:56:00.002-05:00</published><updated>2014-11-12T13:58:47.285-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>[Python] Plot a Gaussian and overlay with an image</title><content type='html'>&amp;nbsp; &amp;nbsp; x,y = np.random.multivariate_normal(mean, cov, 9000000).T&lt;br /&gt;
&amp;nbsp; &amp;nbsp; x = x + center_x&lt;br /&gt;
&amp;nbsp; &amp;nbsp; y = y + center_y&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; heatmap, xedges, yedges = np.histogram2d(x, y, bins=(640, 480), range=[[0, 640], [0, 480]])&lt;br /&gt;
&amp;nbsp; &amp;nbsp; extent = [0, 640, 0, 480]&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # convert heatmap to image&lt;br /&gt;
&amp;nbsp; &amp;nbsp; heatmap = heatmap / max(heatmap.flatten())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; print max(heatmap.flatten())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; heatmap_im = Image.fromarray(np.uint8(cm.jet(np.transpose(heatmap))*255))&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; blend_im = Image.blend(im.convert(&quot;RGBA&quot;), heatmap_im, 0.4)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; blend_im.save(&quot;blend.png&quot;, &quot;PNG&quot;)</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/920056178137916237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/920056178137916237' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/920056178137916237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/920056178137916237'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2014/11/python-plot-gaussian-and-overlay-with.html' title='[Python] Plot a Gaussian and overlay with an image'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-1060025336472228153</id><published>2014-11-11T10:52:00.001-05:00</published><updated>2014-11-11T10:52:09.749-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>[Python] Conversion from matplotlib figure to PIL image</title><content type='html'>def fig2img ( fig ):&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;&quot;&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @brief Convert a Matplotlib figure to a PIL Image in RGBA format and return it&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @param fig a matplotlib figure&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @return a Python Imaging Library ( PIL ) image&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;&quot;&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # put the figure pixmap into a numpy array&lt;br /&gt;
&amp;nbsp; &amp;nbsp; buf = fig2data ( fig )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; w, h, d = buf.shape&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return Image.fromstring( &quot;RGBA&quot;, ( w ,h ), buf.tostring( ) )&lt;br /&gt;
&lt;br /&gt;
def fig2data ( fig ):&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;&quot;&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @brief Convert a Matplotlib figure to a 4D numpy array with RGBA channels and return it&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @param fig a matplotlib figure&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @return a numpy 3D array of RGBA values&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;&quot;&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # draw the renderer&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fig.canvas.draw ( )&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # Get the RGBA buffer from the figure&lt;br /&gt;
&amp;nbsp; &amp;nbsp; w,h = fig.canvas.get_width_height()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; buf = numpy.fromstring ( fig.canvas.tostring_argb(), dtype=numpy.uint8 )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; buf.shape = ( w, h,4 )&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # canvas.tostring_argb give pixmap in ARGB mode. Roll the ALPHA channel to have it in RGBA mode&lt;br /&gt;
&amp;nbsp; &amp;nbsp; buf = numpy.roll ( buf, 3, axis = 2 )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return buf</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/1060025336472228153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/1060025336472228153' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/1060025336472228153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/1060025336472228153'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2014/11/python-conversion-from-matplotlib.html' title='[Python] Conversion from matplotlib figure to PIL image'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-1246909332839672067</id><published>2014-11-11T10:51:00.001-05:00</published><updated>2014-11-11T10:51:18.022-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>[Python] save a figure in matplotlib with figure border removed</title><content type='html'>def SaveFigureAsImage(fileName,fig=None,**kwargs):&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &#39;&#39;&#39; Save a Matplotlib figure as an image without borders or frames.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Args:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileName (str): String that ends in .png etc.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fig (Matplotlib figure instance): figure you want to save as the image&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Keyword Args:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; orig_size (tuple): width, height of the original image used to maintain&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aspect ratio.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &#39;&#39;&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fig_size = fig.get_size_inches()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; w,h = fig_size[0], fig_size[1]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fig.patch.set_alpha(0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if kwargs.has_key(&#39;orig_size&#39;): # Aspect ratio scaling if required&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; w,h = kwargs[&#39;orig_size&#39;]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; w2,h2 = fig_size[0],fig_size[1]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fig.set_size_inches([(w2/w)*w,(w2/w)*h])&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fig.set_dpi((w2/w)*fig.get_dpi())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; a=fig.gca()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; a.set_frame_on(False)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; a.set_xticks([]); a.set_yticks([])&lt;br /&gt;
&amp;nbsp; &amp;nbsp; plt.axis(&#39;off&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; plt.xlim(0,w); plt.ylim(h,0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fig.savefig(fileName, transparent=True, bbox_inches=&#39;tight&#39;, \&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pad_inches=0)</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/1246909332839672067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/1246909332839672067' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/1246909332839672067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/1246909332839672067'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2014/11/python-save-figure-in-matplotlib-with.html' title='[Python] save a figure in matplotlib with figure border removed'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-361891356781140826</id><published>2014-08-12T23:05:00.001-04:00</published><updated>2014-08-13T11:06:29.749-04:00</updated><title type='text'>说走就走的波多黎各</title><content type='html'>&quot;流年似水，太过匆匆，一些故事来不及真正开始，就被写成了昨天；一些人还没有好好相爱，就成了过客。&quot; - 林徽因&lt;br /&gt;
&lt;br /&gt;
想去波多黎各，多半还是因为马尔克斯笔下那片沼泽地圣胡安（《霍乱时期的爱情》）。任何一个有历史的城市，都藏着诸多感动人的故事，圣胡安（San Juan）也不例外。作为波多黎各最大、最古老的城市，这里从殖民地时期的一开始就成为西班牙人从大洋彼岸到美洲大陆征服之路的第一站。想想波多黎各（Puerto Rico）在西班牙语中的意思：Puerto就是英语中的Port（港口），Rico就是英语中的Rich（富饶），直译过来就是富饶之港，一看就是典型的大航海时代殖民地名字的取法，再如象牙海岸（科特迪瓦），黄金海岸（加纳），等等。我一直觉得翻译是一门艺术，要把音的和谐和义的传达完美结合起来，确实是很难的一件事情。&lt;br /&gt;
&lt;br /&gt;
“说走就走”，其实仅仅是对于旅行的行程计划而言，而对于圣胡安老城以及波多黎各的向往，则是心存已久了。在美国的小伙伴们都知道，美国大部分的城镇清一色的相似，历史底蕴的缺乏强烈限制了大家出行的选择。对于喜欢自然风光的朋友来说，美国是个绝佳的地方：地广人稀，从阿拉斯加的极光，到旖旎多姿的黄石，再到迈阿密和Key West的海滩，各种各样的风景让人流连忘返。可是波多黎各却是这样一个神奇的地方，作为美国的海外领，它保存了绝大部分西班牙殖民地时期的风土人情（当地人的第一语言是西班牙语），但又不需要额外办理签证，这为常年驻扎在北美大陆的同学们提供了一个不一样的旅行目的地。&lt;br /&gt;
&lt;br /&gt;
7月21号，博士论文答辩结束，我终于长舒了一口气，23号订了7月31号从Indianapolis到San Juan的机票，8月5号返回。由于订的较晚，所以机票大概500刀左右，如果提早预定的话应该可以到400左右。然后就是酒店，我直接参考之前去过的同学住的地方，订了在San Juan Downtown的At Wind Chimes Hotel，100刀一晚（还是订晚了的缘故，早订的话房间多，会便宜些）。最后是租车，直接订好了在San Juan机场取／还。&lt;br /&gt;
&lt;br /&gt;
OK，流水账开始。&lt;br /&gt;
&lt;br /&gt;
Day 1 （7月31号）：&lt;br /&gt;
&lt;br /&gt;
飞机是中午12点从Indianapolis起飞，下午1:30到Atlanta，然后从Atlanta转机再飞三个多小时到San Juan。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZUvlRw3N7vTU0i9u7layxBniONgdSxN3ZbTxzxeEo-FrIMjVyrhyphenhyphenZ_NGnbBruhPh0LKea4k5FTj8t7fgp7SdYbCjcyHm7Cn0o0JjKQsTwInVTJhrv7RL9hNOXITa8DOf4eJ9dZXfjzYj9/s1600/14712859659_7f12e4445a_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZUvlRw3N7vTU0i9u7layxBniONgdSxN3ZbTxzxeEo-FrIMjVyrhyphenhyphenZ_NGnbBruhPh0LKea4k5FTj8t7fgp7SdYbCjcyHm7Cn0o0JjKQsTwInVTJhrv7RL9hNOXITa8DOf4eJ9dZXfjzYj9/s1600/14712859659_7f12e4445a_o.jpg&quot; height=&quot;480&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
圣胡安的机场名称叫&amp;nbsp;Luis Muñoz Marín International Airport，是以现代波多黎各之父（Father of Modern Puerto Rico）Luis Muñoz Marín的名字命名的。下面机场图片是当天晚上九点抵达机场所摄。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAhl_VPT3AlgQ1bEHpr_-x995Oz3myLBEXN2u9hB_0Z-_GC04H_Am4TWDzX3SkBwr52i14i1tXWUlcqegV8Qx2bmBAkV762CDqxfObyYX32oqK-XpCcJO8mtj5KJK_nCknmTXnW-z0wZgA/s1600/14896381271_a1aab06e1c_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAhl_VPT3AlgQ1bEHpr_-x995Oz3myLBEXN2u9hB_0Z-_GC04H_Am4TWDzX3SkBwr52i14i1tXWUlcqegV8Qx2bmBAkV762CDqxfObyYX32oqK-XpCcJO8mtj5KJK_nCknmTXnW-z0wZgA/s1600/14896381271_a1aab06e1c_o.jpg&quot; height=&quot;480&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO8S_j-q_mhEfv-Wv2U0l6vIz_duwChrYiz_baw4dK9rsz9hv3OCJ6dm9LXFEplvAtYYuURyyhD90IBxYZqTDUY3Wz4XyE30K3xuYnBJtwocRkz4HzKA-EQsge0274EKZNHt7jCthPqKzc/s1600/14896384861_897a066a97_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO8S_j-q_mhEfv-Wv2U0l6vIz_duwChrYiz_baw4dK9rsz9hv3OCJ6dm9LXFEplvAtYYuURyyhD90IBxYZqTDUY3Wz4XyE30K3xuYnBJtwocRkz4HzKA-EQsge0274EKZNHt7jCthPqKzc/s1600/14896384861_897a066a97_o.jpg&quot; height=&quot;480&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxivkV4SgnM0MK451FoKQjqL5pAlagm2BqR5dGakg1laKQWzLzXm9s7Qgxw_4stg7-BE6PWej3iwSQThwcr3CmKsnEEBSU4HA6RK5H89vUNXyuHRUNbcZ0db5oKMv_zarTQe9kM-gvgqv_/s1600/14899097302_e446ff4883_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxivkV4SgnM0MK451FoKQjqL5pAlagm2BqR5dGakg1laKQWzLzXm9s7Qgxw_4stg7-BE6PWej3iwSQThwcr3CmKsnEEBSU4HA6RK5H89vUNXyuHRUNbcZ0db5oKMv_zarTQe9kM-gvgqv_/s1600/14899097302_e446ff4883_o.jpg&quot; height=&quot;640&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
然后是到机场的租车公司前台提车，等到到酒店已经快晚上10点了。一路上没吃好，在Yelp上搜到酒店附近的一家Bar，买了一分海鲜墨鱼汁意面。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju0jdcr-QNxNRm6h4XiVW-rTG92NkehPyWaYXgkiElpJDylljiiXFEsikGSFJuK-2kyr0jl7fMGuVixSgzdRWkivvwVwEH6EVex57q0cGr0afL59BXpWDJw8PCD9d6rpspFJfvIsAe9zk-/s1600/14896667741_ca0dbbd895_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju0jdcr-QNxNRm6h4XiVW-rTG92NkehPyWaYXgkiElpJDylljiiXFEsikGSFJuK-2kyr0jl7fMGuVixSgzdRWkivvwVwEH6EVex57q0cGr0afL59BXpWDJw8PCD9d6rpspFJfvIsAe9zk-/s1600/14896667741_ca0dbbd895_o.jpg&quot; height=&quot;480&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
自己不算是吃货，但是加勒比海的美食实在让人无法抗拒，后面会有更多关于食物的图片。&lt;br /&gt;
&lt;br /&gt;
Day 2 （8月1号）：&lt;br /&gt;
&lt;br /&gt;
今天逛老城。老城比较小，在靠海边的位置，离我住的地方开车要15分钟到20分钟左右。老城最著名的景点就是El Morro了。沿着城边靠海筑起来的城墙，蜿蜒伸展，一直把圣胡安严严实实的包裹起来（可见这里绝对是一个军事要塞）。El Morro已归入美国National Park Service管理，门票五块钱（请对比一下国内旅游景点收费情况）。&lt;br /&gt;
&lt;br /&gt;
孤独的瞭望塔。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqLG5uAfHAOo3SHRsJXCMcRKyFzYoYQ31utz3ZnQU3V5eoO-368LrHnSUIvpzC1PwNWWA7AV61rCgMVg-eyTHHvWfA92eCU5SnxeSF3z9GSvpfIM58orPE6CIMcgP6uobCybS7qmHPkdfA/s1600/14660722428_6e9d2d89a7_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqLG5uAfHAOo3SHRsJXCMcRKyFzYoYQ31utz3ZnQU3V5eoO-368LrHnSUIvpzC1PwNWWA7AV61rCgMVg-eyTHHvWfA92eCU5SnxeSF3z9GSvpfIM58orPE6CIMcgP6uobCybS7qmHPkdfA/s1600/14660722428_6e9d2d89a7_o.jpg&quot; height=&quot;425&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
城墙外的墓地。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHIlcskk-jZ61v20I0s45b9MU-mr00EAFEfMtNbhr-Ktei5fthZFJ07vrVkiT7aU1mzVrpZxhg7sJVMKXo6C9laI2TiodptuYAJ06sdYhQKyiSNAee0CcyDfHmeehgM_zq5HrJQ9Q5edwy/s1600/14660714128_e7de7fb739_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHIlcskk-jZ61v20I0s45b9MU-mr00EAFEfMtNbhr-Ktei5fthZFJ07vrVkiT7aU1mzVrpZxhg7sJVMKXo6C9laI2TiodptuYAJ06sdYhQKyiSNAee0CcyDfHmeehgM_zq5HrJQ9Q5edwy/s1600/14660714128_e7de7fb739_o.jpg&quot; height=&quot;426&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
五彩缤纷的老城。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWUOTSbVba_PtgFeiY2p6XwBj4kSNj682Olzfgs5KZVzh6_yjWT1uorXa3meSoMRb6IAgEy8ZgI3DfyOVFl0RWiHzZ40rS-Q5HmZoro-pRpTHw39ip6bhU5F0Kgtbq37-80h5gbxo6ljEA/s1600/14660700658_24bd9a2104_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWUOTSbVba_PtgFeiY2p6XwBj4kSNj682Olzfgs5KZVzh6_yjWT1uorXa3meSoMRb6IAgEy8ZgI3DfyOVFl0RWiHzZ40rS-Q5HmZoro-pRpTHw39ip6bhU5F0Kgtbq37-80h5gbxo6ljEA/s1600/14660700658_24bd9a2104_o.jpg&quot; height=&quot;426&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
背面是瞭望塔，再后面是大西洋，最远处是西班牙。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDj8DhKpIpqhjLKCnu6kqff6ozyIYJaIq9Ene7bZv5Vnt_Tsphv7i55a_lXxkDsEK7-j15L3bte8L38OooAwpGuco-haVFQFBcuk-i3HH3BYzXFsSJy1qDzK7czTv40iwwNEEzUgTJbIGX/s1600/14715897247_1ecece28ab_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDj8DhKpIpqhjLKCnu6kqff6ozyIYJaIq9Ene7bZv5Vnt_Tsphv7i55a_lXxkDsEK7-j15L3bte8L38OooAwpGuco-haVFQFBcuk-i3HH3BYzXFsSJy1qDzK7czTv40iwwNEEzUgTJbIGX/s1600/14715897247_1ecece28ab_o.jpg&quot; height=&quot;640&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
古老的市政大厅（La Alcaldía）&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisP7BzLHvEhZCJwhYSHjWCaNDx1MJjSvOOVHS85ORkVYDh8hQjmAL8pG8HHT7bCbbA0a0FS5ktWhGdHaOugmyilFaO_f_bjAUw_1jqFw5XTP8pSSzEXXhnWTFUUZEpH0RLc_LzJUSYLbbQ/s1600/14899386351_3e3a651e18_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisP7BzLHvEhZCJwhYSHjWCaNDx1MJjSvOOVHS85ORkVYDh8hQjmAL8pG8HHT7bCbbA0a0FS5ktWhGdHaOugmyilFaO_f_bjAUw_1jqFw5XTP8pSSzEXXhnWTFUUZEpH0RLc_LzJUSYLbbQ/s1600/14899386351_3e3a651e18_o.jpg&quot; height=&quot;480&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
诗人咖啡馆（Poet‘s Passage）。非常文艺的一个小咖啡馆，每种咖啡都起了和诗歌相关的名字。每张桌子旁边有一个小抽屉，里面装满了来来往往客人们写下的片段文字。一定要点一杯加冰的玛奇朵，非常赞。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-l4vNMZ-iS__6mAyfQjgBEpNPmAFrqOcwKV1BHnXLaku_gDz74Z_cP2VgUN2Al08Vaf46e38EN9Uy0WRE4Y4Uo3DQzCqPXareLP1xjwtPpfOck0a6rQrCAAUu3hAe5DxJh_A4eLYr3cqP/s1600/14715835598_890a039c85_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-l4vNMZ-iS__6mAyfQjgBEpNPmAFrqOcwKV1BHnXLaku_gDz74Z_cP2VgUN2Al08Vaf46e38EN9Uy0WRE4Y4Uo3DQzCqPXareLP1xjwtPpfOck0a6rQrCAAUu3hAe5DxJh_A4eLYr3cqP/s1600/14715835598_890a039c85_o.jpg&quot; height=&quot;480&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
整个一天都在老城，晚饭吃了Puerto Rico当地著名的一种食物，叫Mofongo。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUJIfk3O3WVkuuVXXR1h464xhrPgzI4a1CZnM_1nI6nrsCVgVplgfiwfb33NB0mP7MbjcqsteXbODSp9hc3MVbLXYhISzFxoxChQz6dYopGniEG812xJT_WSB4MaY4khqDcInRzqkg9Oj5/s1600/14715935099_e93cfc99e2_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUJIfk3O3WVkuuVXXR1h464xhrPgzI4a1CZnM_1nI6nrsCVgVplgfiwfb33NB0mP7MbjcqsteXbODSp9hc3MVbLXYhISzFxoxChQz6dYopGniEG812xJT_WSB4MaY4khqDcInRzqkg9Oj5/s1600/14715935099_e93cfc99e2_o.jpg&quot; height=&quot;640&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
同时要了两大杯Mojito，这下可不得了，直接醉过去了。。完全不能走路，更别说开车回酒店了，于是在餐馆一直坐着，热心的服务员不停的给我茶水喝，两个小时之后我才离开：）&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Day 3（八月2号）：&lt;br /&gt;
&lt;br /&gt;
今天起的很早，本来是想直奔码头，去C岛逛逛海滩，没想到一大早就开始下雨，上岛的渡轮也全部取消。赶紧查了下天气，才知道今天有storm来临。后来听当地人讲，我来之前波多黎各已经干旱了两个月了，难不成storm是专门为了欢迎我的么。&lt;br /&gt;
&lt;br /&gt;
立即改行程，去附近的super max吃早饭，顺便查了北线的几个海滩。我心想，storm既然从东北方向来，那我就一路往南开到Ponce去。后来的事实证明，这完全是一次错误的选择，导致我差点困在山里出不来。。。&lt;br /&gt;
&lt;br /&gt;
OK，路线是从San Juan出发，向西开，经过Cerro Gordo、Tortuguero、Marchiquita几个海滩之后向南从波多黎各中部穿过去直奔Ponce。首先贴几张这些海滩的照片，雨水伴随着海水一起激烈地拍打着海滩，别有一番味道。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGQK5CumVX-Npy-9rtzD8Y_oPodwfHFtI9NJ3cZeuodntuKhnwCKbX5D8THykOXjjgaxryIXuOTlQPbcqXEmLPiuSoaRE4nIaZXCbl-WRdfKT3On3ZwupuOM1Gt_BHQuORUJLq_wrMNTQ9/s1600/14715994580_c0644f528e_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGQK5CumVX-Npy-9rtzD8Y_oPodwfHFtI9NJ3cZeuodntuKhnwCKbX5D8THykOXjjgaxryIXuOTlQPbcqXEmLPiuSoaRE4nIaZXCbl-WRdfKT3On3ZwupuOM1Gt_BHQuORUJLq_wrMNTQ9/s1600/14715994580_c0644f528e_o.jpg&quot; height=&quot;480&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAnQUbrjQ6p6OtFXevf6LU55Wz1jPExnmfjuz2xwniQ7glqZpWpjOR-3BV5-wWQmsHlG5Ycj1JgE9ESKEYUOm0Fd2HWmhAhcaJV_7HW-cO_qGpxlq8tS5OVoQxeQEqsKj_t_ErO8iMKX6I/s1600/14879666926_70419a7b62_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAnQUbrjQ6p6OtFXevf6LU55Wz1jPExnmfjuz2xwniQ7glqZpWpjOR-3BV5-wWQmsHlG5Ycj1JgE9ESKEYUOm0Fd2HWmhAhcaJV_7HW-cO_qGpxlq8tS5OVoQxeQEqsKj_t_ErO8iMKX6I/s1600/14879666926_70419a7b62_o.jpg&quot; height=&quot;480&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFAvAh022GWGTtzHrE4ix23UmejCuHWifUL6pgHFR_0hYfifbr-sJGeA2miD4AN3MOtTRlVKVmdBheYmHfAhnRU4MqJD-3VU8kg9pB5X_EavOvBUHNEI-xudRSYH1759bjA_jC8AvPYeWd/s1600/14879670376_3960a60a90_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFAvAh022GWGTtzHrE4ix23UmejCuHWifUL6pgHFR_0hYfifbr-sJGeA2miD4AN3MOtTRlVKVmdBheYmHfAhnRU4MqJD-3VU8kg9pB5X_EavOvBUHNEI-xudRSYH1759bjA_jC8AvPYeWd/s1600/14879670376_3960a60a90_o.jpg&quot; height=&quot;480&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijlLgDnt9wVENf1anZOU6EzIU5wyto2snFZYzY01cAaWosBSADWaqD_pABtQPhBVBxLiLuSxmo513vYkk58tgEZO103lsVP35aVC46M7GtRwQAln1JLiUCidkIQoOOw9zibcR96h0dS8TC/s1600/14902312712_33d30aeeef_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijlLgDnt9wVENf1anZOU6EzIU5wyto2snFZYzY01cAaWosBSADWaqD_pABtQPhBVBxLiLuSxmo513vYkk58tgEZO103lsVP35aVC46M7GtRwQAln1JLiUCidkIQoOOw9zibcR96h0dS8TC/s1600/14902312712_33d30aeeef_o.jpg&quot; height=&quot;480&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
大约在中午的时候，我开始往南走，于是悲剧开始了。。。北线海边的雨其实并不算大，但是完全没想到波多黎各中部是山区，全部都是山路，当我开进PR-615的时候就开始觉得不对劲了，路上只有我一辆车，瓢泼的大雨，蜿蜒陡峭的山路，雨刷开到最大也完全抵挡不住雨水的冲击。然而最艰难的还在后面。为了安全起见，我把手机上的google maps和车载GPS同时打开，双导航，可当我开到PR-66xx时，心里着着实实的紧了一下：unpaved的土路，只容得下一个车身的宽度，陡峭的斜坡。。更可怕的时GPS把我导航到了一个deadend。。。瓢泼大雨中一个人在车里折腾半天，终于还是觉得要先保住自己的小命要紧。于是沿着来时的路往回开，因为这时是下坡，所以开的非常非常慢，非常非常小心：一个闪失可能就真的让自己挂掉。。。&lt;br /&gt;
&lt;br /&gt;
这里顺便吐槽一下美国公路的标记方法，统统都用数字，完全看不出每条路的地形。我曾经自驾过法国和瑞士，那里的公路除了用数字，也有字母，用来标记这条路是在山地还是平原。这方面美国佬需要学校一下！&lt;br /&gt;
&lt;br /&gt;
下面是当时的手机截图，蓝色的点是我最终开始决定向北返回的地方。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMd7Xd8OLyQGh9rBhKAzoLA0n-RsW5z8F1x47lwDP-_qfKSQljxRN9Lm4ohWc_R4xRXT8ToFXaEOnpeqGHK0sKD_x3nO-Es26sYw5I0KTeJvHUAEmCy99CRGTP25HBpjT5Idqh48aUXZ5Y/s1600/14715995900_b455d106a9_o.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMd7Xd8OLyQGh9rBhKAzoLA0n-RsW5z8F1x47lwDP-_qfKSQljxRN9Lm4ohWc_R4xRXT8ToFXaEOnpeqGHK0sKD_x3nO-Es26sYw5I0KTeJvHUAEmCy99CRGTP25HBpjT5Idqh48aUXZ5Y/s1600/14715995900_b455d106a9_o.png&quot; height=&quot;640&quot; width=&quot;360&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
庆幸的是，下山途中路过一个小酒吧，里面有八九个躲雨的人，我把车横在路边的土坡上，飞快的钻了进去。感谢热情的波多黎各大叔们，让我在bar里躲了一个小时雨。下午三点，雨开始变小，我于是下山返回San Juan，经过两个小时的高速路终于抵达酒店。&lt;br /&gt;
&lt;br /&gt;
Day 4（8月3号）：&lt;br /&gt;
&lt;br /&gt;
雨后的圣胡安突然变得特别宁静。被告知渡轮还没有恢复运行，而且 El Yunque热带雨林公园也受storm影响仍未开放，于是决定今天继续逛老城。&lt;br /&gt;
&lt;br /&gt;
首先来到第一天miss掉的圣胡安老城城门（Puerta de San Juan）。这里是圣胡安老城唯一的城门，直接面向大西洋，是西班牙人由此上岸的必经之路。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7CV-nKhnCop3WRB5Sc7oyZDqJQi4VhosODGxU1Xs-IxAoYgheISdcG5oI1yD1u04FuR9sHy9dWriXSg7Ml-xwmcV_Ov5UBihk4pnPFHJVV1aldO-9Oyn5M-kx0Y4JqxinncG0a3-6umC0/s1600/14716509777_c61f595c51_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7CV-nKhnCop3WRB5Sc7oyZDqJQi4VhosODGxU1Xs-IxAoYgheISdcG5oI1yD1u04FuR9sHy9dWriXSg7Ml-xwmcV_Ov5UBihk4pnPFHJVV1aldO-9Oyn5M-kx0Y4JqxinncG0a3-6umC0/s1600/14716509777_c61f595c51_o.jpg&quot; height=&quot;480&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
城门外就是浩瀚的大西洋：）&lt;br /&gt;
&lt;br /&gt;
从城门出发往里面走，经过两个block就到了圣胡安大教堂。碰巧的是，我经过这里的时候正好是中午12点，并且是周日做礼拜的时间，挤满了人。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfmc9l_Ty4x_6zDvzU7s1C-pr4SERqUHvgiVrnwTEr9BQqdXVRrmnFGX-XF8pZKSOEX3rS5RYyZCNJOhe9eE71YnMJkN2wnORS1bpN8k4m6mBy3jTy56yaalAJlQmZn7k3GEDZh9E4SIqt/s1600/14716481160_24748ccff6_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfmc9l_Ty4x_6zDvzU7s1C-pr4SERqUHvgiVrnwTEr9BQqdXVRrmnFGX-XF8pZKSOEX3rS5RYyZCNJOhe9eE71YnMJkN2wnORS1bpN8k4m6mBy3jTy56yaalAJlQmZn7k3GEDZh9E4SIqt/s1600/14716481160_24748ccff6_o.jpg&quot; height=&quot;640&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7t1GWGGG0mn80C-USN-oYH9eGlpE3gp0ezH7RoLfTMOT6EkSEpTNp2obVujTWY_3sQRAvScwKyEQjD5mPZTw4ujO2qji2cgrwW7mJWmMCyvXllTjI8QMkw-jZ7JyB4yhEvdYptGQUKC4U/s1600/14716550128_91dc7b7e41_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7t1GWGGG0mn80C-USN-oYH9eGlpE3gp0ezH7RoLfTMOT6EkSEpTNp2obVujTWY_3sQRAvScwKyEQjD5mPZTw4ujO2qji2cgrwW7mJWmMCyvXllTjI8QMkw-jZ7JyB4yhEvdYptGQUKC4U/s1600/14716550128_91dc7b7e41_o.jpg&quot; height=&quot;640&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
中午在老城吃了一份西班牙海鲜饭（Paella），很赞。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCfyCLNX6sz7SzBlm1_cOEWv8Wy-MbDI-wZ_iBi8Zi1jiQtWzwAkz-DXGpVLVBTz3XtxJQukgq-Vo8sLzCavnMLHNoNR-Kl38uBNZlntWBnEWBvBIaW3M67kgWi9hRM4OeQGu3DL2-_6Pe/s1600/14900201111_b62b70c9a0_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCfyCLNX6sz7SzBlm1_cOEWv8Wy-MbDI-wZ_iBi8Zi1jiQtWzwAkz-DXGpVLVBTz3XtxJQukgq-Vo8sLzCavnMLHNoNR-Kl38uBNZlntWBnEWBvBIaW3M67kgWi9hRM4OeQGu3DL2-_6Pe/s1600/14900201111_b62b70c9a0_o.jpg&quot; height=&quot;480&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
下午把老城的很多gift shop和antique shop逛了个遍，买了些纪念品，然后就跑到peot‘s passage要了一杯咖啡对着窗户发呆：）&lt;br /&gt;
&lt;br /&gt;
傍晚来到老城附近的&amp;nbsp;Balneario El Escambrón 海滩。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsWNHFGOCdgq2qMI-kPTkVd-5UTMTxlrIjmClss47eQawNQpJcyacb5OWnWFSA8E-Sp1YamOQ3Q_shc-fWAwWdLQIRfE6EslG1LIzqKiBuqus2a918J9qAffFC1XROzLX5E5n6eGXRspax/s1600/14660683120_a3beae926e_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsWNHFGOCdgq2qMI-kPTkVd-5UTMTxlrIjmClss47eQawNQpJcyacb5OWnWFSA8E-Sp1YamOQ3Q_shc-fWAwWdLQIRfE6EslG1LIzqKiBuqus2a918J9qAffFC1XROzLX5E5n6eGXRspax/s1600/14660683120_a3beae926e_o.jpg&quot; height=&quot;426&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Day 5（8月4号）：&lt;br /&gt;
&lt;br /&gt;
今天是非常精彩的一天！如愿以偿的登上了传说中的C岛（Culebra），和世界第二美的海滩亲密接触。很幸运的偶遇从加州来波多黎各旅游的一家五口美国人，非常nice的一对夫妇，和我爸妈年纪相仿。&lt;br /&gt;
&lt;br /&gt;
big family 大合影，这里的海水真的太干净，太美了。情不自禁地向海里走去，走到越深处，浪打在身上越重，前进就越是艰难。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe0z2KJwPlt-rrV4c6OI-J2gxEUh4Ke0iv55wTA4vTM4YMzkmRYxMxsgcnCD_BBzGA_FFfefw6YJgDdAvrg0iza-SXfVs8KW5p3JNZFVpkP1RJYKKoq9XGUVPDyk7jN3kxBjqPwUlJ47hE/s1600/14847730895_0341e8ea62_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe0z2KJwPlt-rrV4c6OI-J2gxEUh4Ke0iv55wTA4vTM4YMzkmRYxMxsgcnCD_BBzGA_FFfefw6YJgDdAvrg0iza-SXfVs8KW5p3JNZFVpkP1RJYKKoq9XGUVPDyk7jN3kxBjqPwUlJ47hE/s1600/14847730895_0341e8ea62_o.jpg&quot; height=&quot;480&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
喂食海鸟的美女们。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUoQNBqdudNnisvFoifYq1zv9BsyxwJAwWB53rLlJb5qhb5vwSnOm-8t_L_ZFLFTPzc2TgCB1JkAgyVXTNUf75eL-A2sJ0OtX-MdZ0BoXBS3iYD3BlAiWhCpG4tBGXBoSbkwQUGgY1pjrz/s1600/14847386715_67e6960345_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUoQNBqdudNnisvFoifYq1zv9BsyxwJAwWB53rLlJb5qhb5vwSnOm-8t_L_ZFLFTPzc2TgCB1JkAgyVXTNUf75eL-A2sJ0OtX-MdZ0BoXBS3iYD3BlAiWhCpG4tBGXBoSbkwQUGgY1pjrz/s1600/14847386715_67e6960345_o.jpg&quot; height=&quot;426&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Day 6（8月5号）：&lt;br /&gt;
&lt;br /&gt;
中午的飞机，一大早起来开着车在城里逛，跑到邮局给同学寄去了明信片。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcTJr-XA1ERTJRDetwmxJVeYiCNRXG_B2X6wix8TDNWHxrdJkX3B0gLsKV9uUZmfhyKzF_FEYrygHZLbkz1phxvwxn3rn3UOT_T3dzKld0O0RYobEsVjNQPwlOz3WMNHaSw53gpFBJ9Tqw/s1600/14716878428_750a0b3b52_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcTJr-XA1ERTJRDetwmxJVeYiCNRXG_B2X6wix8TDNWHxrdJkX3B0gLsKV9uUZmfhyKzF_FEYrygHZLbkz1phxvwxn3rn3UOT_T3dzKld0O0RYobEsVjNQPwlOz3WMNHaSw53gpFBJ9Tqw/s1600/14716878428_750a0b3b52_o.jpg&quot; height=&quot;480&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
美丽的波多黎各，再见。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/361891356781140826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/361891356781140826' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/361891356781140826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/361891356781140826'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2014/08/blog-post.html' title='说走就走的波多黎各'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZUvlRw3N7vTU0i9u7layxBniONgdSxN3ZbTxzxeEo-FrIMjVyrhyphenhyphenZ_NGnbBruhPh0LKea4k5FTj8t7fgp7SdYbCjcyHm7Cn0o0JjKQsTwInVTJhrv7RL9hNOXITa8DOf4eJ9dZXfjzYj9/s72-c/14712859659_7f12e4445a_o.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-8569191673926955559</id><published>2014-02-14T21:33:00.003-05:00</published><updated>2014-02-14T21:33:55.691-05:00</updated><title type='text'>VI 自带的spell checker</title><content type='html'>:s spell&lt;br /&gt;
&lt;br /&gt;
才发现的。。很好用！</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/8569191673926955559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/8569191673926955559' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/8569191673926955559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/8569191673926955559'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2014/02/vi-spell-checker.html' title='VI 自带的spell checker'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-9082440131856454871</id><published>2013-09-01T00:23:00.004-04:00</published><updated>2013-09-01T00:23:47.795-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Miscellaneous - 杂七杂八"/><title type='text'>[zz]数码摄影中的测光方法和测光技巧</title><content type='html'>一、相机的测光原理&lt;br /&gt;
    &lt;br /&gt;
    　　
    相机（数码和各种胶片）的测光原理并不复杂，最重要的是我们要明白，相机的测光系统（或测光表）是以何为测量基准的！通俗地讲，就是相机在测量一个场景的光线时，它怎样“想”自己看到的东西？ 
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    　　
    记住：所有的相机在测光过程中，会将“看到”的所有物体都默认为反射率为18%的灰色（摄影的专业术语叫“中级灰”），并以此作为测光的基准。也就是说，在相机的“眼”中，所有的被摄体都是灰色的，曝光的目的是为了正确还原这种灰色。&lt;br /&gt;
    &lt;br /&gt;
    　　
    为什么是这个特殊的18%灰？因为18%灰与人皮肤平均反射光（16～20％）的色调一样，而人是我们最常拍摄的对象。（其它物体的反射率，如银是96％，绘图白纸75％，纯黑是3％等。）&lt;br /&gt;
    &lt;br /&gt;
    　　
    测光表工作时，要看被摄体的反射率是否为18%，如果反射率是18%，那它测量出来的数值就十分准确了，按此数值曝光，被摄体的色彩和影调就会得以真实地还原，所以，对我们的皮肤、平常的色彩斑斓的景物来说，这种以灰色基调为还原标准的曝光是非常准确的。&lt;br /&gt;
    &lt;br /&gt;
    　　
    如果被摄体的反射率不是18%，那么相机测光系统测量出来的数值就不准确，若直接按此数值曝光，画面的影调和色彩就会出现失真：像拍摄白茫茫的雪原、黑漆漆的煤田，相机也把它们当作灰色来还原，直接对着它们测光聚焦，往往会拍出灰色的雪和煤。&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    　　小窍门：数码拍摄中，合理测光的几个小技巧：&lt;br /&gt;
    &lt;br /&gt;
    　　① 
    拍雪景，你可以先对着你的手半按下快门，也就是对自己的皮肤进行测光，然后再对种你要拍的雪按下快门，那么雪就是白颜色了。同理，拍摄穿黑衣服的人像，也应先对脸部进行测光，然后再构图拍摄。）&lt;br /&gt;
    &lt;br /&gt;
    　　② 当拍摄明亮物体时，应采用比测光表推荐的指数高1～2档的光圈，而对阴暗物体则要适当减少曝光量。&lt;br /&gt;
    &lt;br /&gt;
    　　③ 
    在阳光很充足的季节拍照，将使照片产生很大的反差，所以必须要对景物的明亮、阴暗部位分别测光，并以两者的平均曝光指数进行拍照。&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    　　大秘诀：记住下面的一些物质，它们的反射值接近18%，也许对大家在复杂的条件下拍摄非常有用：&lt;br /&gt;
    &lt;br /&gt;
    　　① 草（割后的草地！），但注意，不是墨绿、特别绿或发黄的草；&lt;br /&gt;
    &lt;br /&gt;
    　　② 大部分浅绿的树叶或植物叶子；&lt;br /&gt;
    &lt;br /&gt;
    　　③ 有些、但不是全部树干；&lt;br /&gt;
    &lt;br /&gt;
    　　④ 旧的、修复的柏油路和混凝土（这个非常有用）；&lt;br /&gt;
    &lt;br /&gt;
    　　⑤ 长期放置、没有刷油的木材；&lt;br /&gt;
    &lt;br /&gt;
    　　⑥ 红/棕色的砖，包括水泥墙；&lt;br /&gt;
    &lt;br /&gt;
    　　⑦ 干树叶。&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    下图是我依据测光原理，用DC拍的两张PP，以便通俗地说明问题。&lt;br /&gt;
    &lt;br /&gt;
    &lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;http://www.cphoto.net/xxyd/96-1.jpg&quot; width=&quot;400&quot; /&gt;&lt;br /&gt;
    &lt;br /&gt;
    同样，黑暗的背景也可能骗过相机的测光，造成错误的曝光，下面两幅照片对比说的就是这个道理。（上图，正确的曝光；下图，曝光过度。注：两幅PP引自相关书籍。）&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    需提醒大家注意的是，在一个复杂的场景中拍摄，评价曝光是否准确还需视拍摄主题及我们想要突出的拍摄对象而定。除逆光时剪影拍摄外，一般要求，拍摄主体的曝光尽量准确，细节清晰。
    &lt;br /&gt;
&lt;div align=&quot;center&quot; style=&quot;line-height: 150%;&quot;&gt;
              &lt;img border=&quot;0&quot; src=&quot;http://www.cphoto.net/xxyd/96-2.jpg&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 二、相机的测光方式&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 由于各类相机的构造和功用不尽相同，因此，与之相适应的测光系统和方式也各有所异。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 目前，几乎所有的数码相机测光方式都采用 TTL （Through the lens）、自动测光（Auto 
    Exposure）系统经过镜头来测光。所以，我给大家主要介绍镜头（TTL）测光的一些基本知识，至于单独测光表测光的技巧得请部落的各位大侠出面给我们上课啦。&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    通过镜头（TTL）测光的方式具有携带、使用方便的特点，并在使用滤光镜或近摄皮腔时可以简便、直接地测量出光线经过滤光镜或近摄皮腔阻挡、衰减后的亮度值。基本上，数码相机的测光模式有四种：&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 1、平均测光 （又名“整体测光”）&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    
这是最基本的一种测光方式，这种测光方式将被摄体在取景屏画面内的各种反射光线的亮度进行综合而获得平均亮度值。平均测光的特点是使用简单，但测光精度不
高，在取景范围内明暗分布不均匀的状况下，较难直接依据测光数值来确定合适的曝光量。尤其是当画面中有大面积的白或黑色物质时，给我们提供的往往是一个不
准确的曝光值。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 这种类型的测光系统，主要是在一些低档的入门级数码相机中应用。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 2、中央重点测光 （又名“中央均衡测光” Centerweighted averaging metering ）&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    中央重点测光主要是测量取景屏画面中央长方形或圆形（椭圆形）范围内的亮度，画面其它区域则给以平均测光，长方形或圆形（椭圆形）范围外的亮度对测光结果的影响较小。至于中央面积的多少，因相机不同而异，约占全画面的20-30%。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 由于是依据画面中央最重要主体的光亮度来读取合适的曝光值，显然，这种测光系统的精度高于平均测光。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 另一种中央测光的形式叫做“底部测光”，与中央测光相似，它是对画面的下半部测光，从而可减少对天空的过多注意而产生的错误。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 中央重点测光系统一般用于中档小型数码相机，这种测光模式较适用于人像写真拍摄。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 3、点测光 （Spot metering ）&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    点测光的测光范围是取景器画面中央占整个画面约2～3%面积的区域。点测光基本上不受测光区域外其它景物亮度的影响，因此，可以很方便地使用点测光对被摄体或背景的各个区域进行检测。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 点测光具有较高的灵敏度和精度。但不管怎样，一定要记住，要想实现准确曝光，测光对象应该适合18%灰的要求。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 4、矩阵测光 （又名“分区测光”、“多区域评价测光” Multi-zone evaluative metering ）&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    
这种测光模式也称“智能化”测光，是一种高级的测光方式。测光系统将取景画面分成若干区域（不同的相机划分的形状、方式不同），分别设置测光元件进行测
量，然后通过相机内的微电脑对各个区域的测光信息进行运算、比较，并参照被摄主体的位置，推测出被摄体的受光状态是逆光还是一般光照，从而决定每个区域的
测光加权比重，全部衡量后，计算出合适的曝光值。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 有些相机的矩阵测光系统在决定曝光需要量的同时，还把场景的色彩也计算在内。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 矩阵测光目前较广泛地应用于一些高档数码相机，它能够使相机在各种光线条件下拍摄都取得较好的自动曝光系统。&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    强调：弄明白我们自己手中DC的测光方式非常重要！所以，建议大家好好查阅一下手头的说明书，如果说明书介绍不清楚，可在网上查阅相关技术数据或到你买相机的器材店咨询清楚。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 三、不同测光模式下的测光技巧&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ㈠、平均测光模式&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    这种测光模式最容易出现错误（庆幸的是，只采取这种测光模式的数码相机越来越少了），因为测光系统对每一个物体的测量，都假定为18%的灰。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 为了防止错误地曝光，拍摄中可以考虑采用以下控制测光的方法：&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    1、现在不少数码相机具有“曝光锁定”功能，它的工作方式是，当我们用相机对准拍摄场景中的某一特殊部位（这部分的反光应该相当于10%灰）测光，得到正确的曝光数据后，用曝光锁定控制固定这个曝光条件，然后重新构图，按自己的画面要求取景，最后按下快门。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    2、对于没有“曝光锁定”控制，但具有“手动控制”功能的数码相机，在这种测光模式下，同样也可按此方法拍摄：即靠近现场合适的拍摄主体，让它充满取景器，或者让相机对准反光值相当于18%的其它部分，按这时的曝光值设定光圈和快门，然后回来重新构图、拍摄。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    注：当我们靠近拍摄物体去测光时，不要让自己挡住光线，而且要认准这部分被测光的景物反射值接近18%灰！还有，当测光物体与镜头的距离和被摄主体与镜头的距离不一致时，要注意控制好焦距。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ㈡、中央重点测光模式&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 中央重点测光比平均测光模式更准确，但仍然经常出现上面类似的问题，所以，仍然可以参照前面的测光控制方法和拍摄技巧。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ㈢、点测光模式&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    点测光模式能较好的计算曝光量。我们在拍摄中需要记住的是，寻找取景器画面中光线反射值相当于18%的那些地方，读取曝光量，最好用曝光锁定控制保持住，直到重新构图（如果需要的话）、按下快门。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 注：数码相机在自动拍摄模式下，可先调整镜头准确测光后半按快门，然后移动相机构图、按快门！&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ㈣、矩阵测光模式&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 使用矩阵测光模式，差不多可以得到95%左右很好曝光的效果，但即使是这样，也有可能出现被相机“骗”的遭遇。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    此时，我们能做的事情，就是仔细研究一下“失败”的PP，总结经验，然后在遭遇类似拍摄情况时认真调整，补上（或减少）合适的曝光量。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 四、测光复杂情况下的“分级曝光”技巧&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    有的时候，由于拍摄现场复杂、光线非常不好掌握，或拍摄时间比较紧张、根本来不及考虑太多的测光技巧。在这种情况下，为了避免错失一生难得的摄影机会，我们可以考虑采用“分级曝光”拍摄。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    “分级曝光”是一项摄影技术，通俗地讲，就是在同一场景中拍摄多幅相同的照片，而每幅照片的曝光设定不是按测光系统测定的曝光值，相对于测光表的曝光值，有的曝光不足，有的曝光过度。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    目前，一些先进的数码相机具备自动分级曝光功能（有些相机在说明书中，将这种技术称为“包围式曝光”）。启用该功能后，DC会连续拍摄三张照片，而这三张照片的曝光量相差一档或者两档，这样，三张照片中肯定会有一张是曝光正确的。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 下面，我们通过举例来更形象地说明“手动控制”拍摄模式下的“分级曝光”技巧：&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    假定在一个光线复杂的拍摄场景中，相机的测光指示该场景的曝光值是f8、1/250秒，但我们无法肯定测光是否可靠。于是，可考虑采用下面的“分级曝光”技术拍摄。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    1、首先按测光指示的曝光值设定（f8、1/250秒），拍摄一张照片；接下来，分别改用f11、1/250秒和f5.6、1/250秒各拍摄一张（为了保险起见，还可用f16、1/250秒和f4、1/250秒再多拍两张）；&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    2、现在，换到原来设定的f8光圈，改变快门速度，分别用1/500秒和1/125秒各拍摄一张（同理，仍可用f8、1/1000秒和f8、1/60秒再多拍两张）；&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    将上面拍摄的各张照片传到电脑上对比分析，我们就能逐渐轻松掌握复杂光线情况下的测光和曝光窍门啦。（由于数码相机的存储特性，多拍并不会造成浪费，嘿嘿，就就是我爱DC的最大理由！）&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 提醒：&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ① 
    在“分级拍摄”情况下，改变光圈或快门的设定时，应注意“景深”的变化。同时，还需防止当相机的快门速度低于1/60秒时，相机的抖动和拍摄物体运动的问题。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ② 实际拍摄中，可不必按所有的光圈光圈分级，如果我们只是稍微地不确定曝光设定的正确性，用半档光圈分级会更好一些。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ③ 
    
现在很多数码相机都预设有不同场景拍摄模式（我最近帮同事选购的卡西欧EX-Z40就有“人像、风景、风景中的人像、合成拍摄、预拍、儿童、烛光中的人
像、聚会、宠物、花、自然绿、落日、夜景、夜景中的人像、烟火、食物、文字、收集品、黑白、古风、黎明和黄昏”等，整整21种场景模式可供选择！另外，如
果觉得你场景不够灵活，还可以选择一张自己拍得比较好的照片，作为“自定义场景”），这样测光时就相对精确多了，求助于它们的帮助，可以得到正确的曝光补
偿。&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 五、不同受光情况下的测光方法和技巧（有点太专业，我等“菜鸟”级色友看看即可）&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    根据光源的性质和照明状况，拍摄时被摄体的受光情况大致有三种：连续光、闪光和混合光。在这三种光照下，测光的方法和技巧是有所区别的。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ㈠、连续光测光&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    连续光的最大特点是稳定及便于观察照明效果，因为，它的测光方法是最多的，通常有机位测光法、接近主体测光法、平均测光法、中性灰卡测光法、被摄体主调测光法、最亮点与最暗点测光法以及多点测光法等。其中，最为实用的是中性灰卡测光法和被摄体主调测光法。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 1、中性灰卡测光法&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    
中性灰卡测光法是既简便又较为准确的测光法，它将反射率为18%的标准灰卡作为测光对象。用此法测光时，要尽量使中性灰卡靠近被摄体，并与之平行，灰卡正
对照相机，与镜头光轴垂直，为避免灰卡反光，可将灰卡稍向前俯。中性灰卡测光法最大的好处是可以避免因对被摄体的测光部位选择不当而产生测光误差。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 摄影小常识：一般摄影器材店都销售“灰卡”，买一个放在自己的相机包里，关键时刻会起作用的！&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 2、被摄体主调测光法&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    
当被摄体的亮部和暗部分布均匀、照明均匀时，测光是很容易的；反之，测光就变得较难了。遇到这种情况，我们一般可采用被摄体主调测光法。该法是对被摄体的
主要局部作“点测光”的测光方法，它的操作较简便，测光时的关键是选好被摄体的主调，即是以被摄体的亮部作为主调，还是以中间调部分或暗部作为主调。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 被摄体测光法的优点是能确保被摄体主调部分有良好的层次与细节表现。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ㈡、闪光测光&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    闪光不同于连续光，它只是瞬间发光，因此，使用一般的连续光测光表是无法进行正确测光的，必须考虑带有闪光测光功能的测光表，并且将测光状态置于“闪光测光”状态。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    目前对闪光的测光一般采用入射式测光表测量，测得的数值是闪光照明下反射率为18%的中性灰的曝光值。有关详细技巧可在以后的《数码相机的闪光摄影》中再做专题介绍。&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ㈢、混合光测光&lt;br /&gt;
    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    混合光是指发光性质不同的光源混合使用。它在摄影中其实并不常用，主要是因为不同光源的色温不同，会给被摄对象各区域色彩的准确还原带来困难，另外，性质不同的光源混合使用，尤其是连续光和闪光混合使用，也会给影像的曝光控制带来困难。</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/9082440131856454871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/9082440131856454871' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/9082440131856454871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/9082440131856454871'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2013/09/zz.html' title='[zz]数码摄影中的测光方法和测光技巧'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-2934413538570496219</id><published>2012-12-13T15:13:00.000-05:00</published><updated>2012-12-13T15:13:11.441-05:00</updated><title type='text'>[leetcode] mimimum depth of binary tree</title><content type='html'>&lt;div class=&quot;row-even question-title&quot; id=&quot;question_111&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; border: 1px solid rgb(255, 255, 255); cursor: pointer; font-size: 13px; margin: 0px; outline: 0px; padding: 5px 8px; vertical-align: baseline;&quot;&gt;
&lt;b style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Minimum Depth of Binary Tree&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;row-even question-content&quot; style=&quot;background-color: white; border: 1px solid rgb(255, 255, 255); font-size: 13px; margin: 0px; outline: 0px; padding: 5px 8px 5px 30px; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Given a binary tree, find its minimum depth.&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href=&quot;http://www.leetcode.com/onlinejudge#&quot; style=&quot;background-color: transparent; border: 0px; color: blue; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;* Definition for binary tree&lt;br /&gt;
&amp;nbsp;* struct TreeNode {&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; int val;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode *left;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode *right;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode(int x) : val(x), left(NULL), right(NULL) {}&lt;br /&gt;
&amp;nbsp;* };&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
class Solution {&lt;br /&gt;
public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int minDepth(TreeNode *root) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Start typing your C/C++ solution below&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // DO NOT write int main() function&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!root)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; queue&lt;treenode&gt; my_queue;&lt;/treenode&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my_queue.push(root);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my_queue.push(NULL);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int depth = 0, min_depth = 9999;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (!my_queue.empty())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TreeNode *front = my_queue.front();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my_queue.pop();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!front)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; depth++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!front-&amp;gt;left &amp;amp;&amp;amp; !front-&amp;gt;right)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (min_depth &amp;gt; depth)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; min_depth = depth;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (front-&amp;gt;left) my_queue.push(front-&amp;gt;left);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (front-&amp;gt;right) my_queue.push(front-&amp;gt;right);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; front = my_queue.front();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!front) my_queue.push(NULL);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; min_depth++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return min_depth;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
};&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/2934413538570496219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/2934413538570496219' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/2934413538570496219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/2934413538570496219'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/12/leetcode-mimimum-depth-of-binary-tree.html' title='[leetcode] mimimum depth of binary tree'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-8726809199377949214</id><published>2012-12-13T14:14:00.001-05:00</published><updated>2012-12-13T14:14:36.991-05:00</updated><title type='text'>[leetcode] maximum depth of binary tree</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;row-odd question-title&quot; id=&quot;question_104&quot; style=&quot;background-color: #f8f8f8; background-position: initial initial; background-repeat: initial initial; border: 1px solid rgb(248, 248, 248); cursor: pointer; font-size: 13px; margin: 0px; outline: 0px; padding: 5px 8px; vertical-align: baseline;&quot;&gt;
&lt;b style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Maximum Depth of Binary Tree&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;row-odd question-content&quot; style=&quot;background-color: #f8f8f8; border: 1px solid rgb(248, 248, 248); font-size: 13px; margin: 0px; outline: 0px; padding: 5px 8px 5px 30px; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Given a binary tree, find its maximum depth.&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href=&quot;http://www.leetcode.com/onlinejudge#&quot; style=&quot;background-color: transparent; border: 0px; color: blue; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;* Definition for binary tree&lt;br /&gt;
&amp;nbsp;* struct TreeNode {&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; int val;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode *left;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode *right;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode(int x) : val(x), left(NULL), right(NULL) {}&lt;br /&gt;
&amp;nbsp;* };&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
class Solution {&lt;br /&gt;
public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int maxDepth(TreeNode *root) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Start typing your C/C++ solution below&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // DO NOT write int main() function&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!root)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // level traversal&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; queue&lt;treenode&gt; my_queue;&lt;/treenode&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my_queue.push(root);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my_queue.push(NULL); // a dummy node&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int depth = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (!my_queue.empty())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TreeNode *front = my_queue.front();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my_queue.pop();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!front)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; depth++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (front-&amp;gt;left) my_queue.push(front-&amp;gt;left);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (front-&amp;gt;right) my_queue.push(front-&amp;gt;right);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; front = my_queue.front();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!front) my_queue.push(NULL);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // reduce by 1 because of the last dummy node&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; depth--;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return depth;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
};&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/8726809199377949214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/8726809199377949214' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/8726809199377949214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/8726809199377949214'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/12/leetcode-maximum-depth-of-binary-tree.html' title='[leetcode] maximum depth of binary tree'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-7248928874248519502</id><published>2012-12-12T20:08:00.005-05:00</published><updated>2012-12-13T10:44:33.855-05:00</updated><title type='text'>[leetcode] longest common prefix</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;row-even question-title&quot; id=&quot;question_14&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; border: 1px solid rgb(255, 255, 255); cursor: pointer; font-size: 13px; margin: 0px; outline: 0px; padding: 5px 8px; vertical-align: baseline;&quot;&gt;
&lt;b style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Longest Common Prefix&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;row-even question-content&quot; style=&quot;background-color: white; border: 1px solid rgb(255, 255, 255); font-size: 13px; margin: 0px; outline: 0px; padding: 5px 8px 5px 30px; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Write a function to find the longest common prefix string amongst an array of strings.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href=&quot;http://www.leetcode.com/onlinejudge#&quot; style=&quot;background-color: transparent; border: 0px; color: blue; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
这个简单，差不多一遍通过：）&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class Solution {&lt;br /&gt;
public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; string longestCommonPrefix(vector&lt;string&gt; &amp;amp;strs) {&lt;/string&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Start typing your C/C++ solution below&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // DO NOT write int main() function&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (strs.empty())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return string(&quot;&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // first find the minimum string length&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int min_len = strs[0].length();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; strs.size(); i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (min_len &amp;gt; strs[i].length())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; min_len = strs[i].length();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // compare staring at [min_len-1]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int length = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int index = 0; index &amp;lt; min_len; index++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bool all_equal = true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int cur = 1; cur &amp;lt; strs.size(); cur++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (strs[cur-1][index] != strs[cur][index])&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; all_equal = false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (all_equal)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; length = index + 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return strs[0].substr(0,length);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
};</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/7248928874248519502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/7248928874248519502' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/7248928874248519502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/7248928874248519502'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/12/longest-common-prefix-write-function-to.html' title='[leetcode] longest common prefix'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-3586979728018157236</id><published>2012-12-12T18:49:00.004-05:00</published><updated>2012-12-12T18:49:45.865-05:00</updated><title type='text'>[leetcode] count and say</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;row-even question-title&quot; id=&quot;question_38&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; border: 1px solid rgb(255, 255, 255); cursor: pointer; font-size: 13px; margin: 0px; outline: 0px; padding: 5px 8px; vertical-align: baseline;&quot;&gt;
&lt;b style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Count and Say&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;row-even question-content&quot; style=&quot;background-color: white; border: 1px solid rgb(255, 255, 255); font-size: 13px; margin: 0px; outline: 0px; padding: 5px 8px 5px 30px; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
The count-and-say sequence is the sequence of integers beginning as follows:&lt;br style=&quot;margin: 0px;&quot; /&gt;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;1, 11, 21, 1211, 111221, ...&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;1&lt;/code&gt;&amp;nbsp;is read off as&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;&quot;one 1&quot;&lt;/code&gt;&amp;nbsp;or&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;11&lt;/code&gt;.&lt;br style=&quot;margin: 0px;&quot; /&gt;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;11&lt;/code&gt;&amp;nbsp;is read off as&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;&quot;two 1s&quot;&lt;/code&gt;&amp;nbsp;or&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;21&lt;/code&gt;.&lt;br style=&quot;margin: 0px;&quot; /&gt;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;21&lt;/code&gt;&amp;nbsp;is read off as&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;&quot;one 2&lt;/code&gt;, then&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;one 1&quot;&lt;/code&gt;&amp;nbsp;or&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;1211&lt;/code&gt;.&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Given an integer&amp;nbsp;&lt;i style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;n&lt;/i&gt;, generate the&amp;nbsp;&lt;i style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;n&lt;/i&gt;&lt;sup style=&quot;background-color: transparent; border: 0px; bottom: 1ex; font-size: x-small; height: 0px; line-height: 1; margin: 0px; outline: 0px; padding: 0px; position: static;&quot;&gt;th&lt;/sup&gt;&amp;nbsp;sequence.&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Note: The sequence of integers will be represented as a string.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href=&quot;http://www.leetcode.com/onlinejudge#&quot; style=&quot;background-color: transparent; border: 0px; color: blue; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class Solution {&lt;br /&gt;
public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; string countAndSay(int n) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Start typing your C/C++ solution below&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // DO NOT write int main() function&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string str = &quot;1&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (n == 1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return str;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 1; i &amp;lt; n; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string new_str = &quot;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int count = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; char ch, pre = &#39;0&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bool flag = false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int k = 0; k &amp;lt; str.length(); k++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ch = str[k];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (ch == pre || k == 0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; count++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ( (k &amp;gt; 0 &amp;amp;&amp;amp; ch != pre ) || k == str.length()-1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; flag = true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (flag)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // update new_str&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; char tmp = &#39;0&#39; + count;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new_str += tmp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (k &amp;gt; 0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new_str += pre;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new_str += ch;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; count = 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; flag = false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // check the last character&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ( k &amp;gt; 0 &amp;amp;&amp;amp; k == str.length()-1 &amp;amp;&amp;amp; ch != pre)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // we know we have to process the&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new_str += &#39;1&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new_str += ch;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pre = ch;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // update str&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; str = new_str;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return str;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
};&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/3586979728018157236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/3586979728018157236' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/3586979728018157236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/3586979728018157236'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/12/leetcode-count-and-say.html' title='[leetcode] count and say'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-2803766713124930567</id><published>2012-12-10T18:42:00.001-05:00</published><updated>2012-12-10T18:42:25.751-05:00</updated><title type='text'>[leetcode] unique binary search trees</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;row-odd question-title&quot; id=&quot;question_96&quot; style=&quot;background-color: #f8f8f8; background-position: initial initial; background-repeat: initial initial; border: 1px solid rgb(248, 248, 248); cursor: pointer; font-size: 13px; margin: 0px; outline: 0px; padding: 5px 8px; vertical-align: baseline;&quot;&gt;
&lt;b style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Unique Binary Search Trees&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;row-odd question-content&quot; style=&quot;background-color: #f8f8f8; border: 1px solid rgb(248, 248, 248); font-size: 13px; margin: 0px; outline: 0px; padding: 5px 8px 5px 30px; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Given&amp;nbsp;&lt;i style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;n&lt;/i&gt;, how many structurally unique&amp;nbsp;&lt;b style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;BST&#39;s&lt;/b&gt;&amp;nbsp;(binary search trees) that store values 1...&lt;i style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;n&lt;/i&gt;?&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
For example,&lt;br style=&quot;margin: 0px;&quot; /&gt;Given&amp;nbsp;&lt;i style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;n&lt;/i&gt;&amp;nbsp;= 3, there are a total of 5 unique BST&#39;s.&lt;/div&gt;
&lt;pre style=&quot;background-attachment: scroll; background-color: #fff7f0; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border: 1px solid rgb(204, 204, 204); color: #222222; line-height: 21px; outline: 0px; overflow: auto; padding: 10px; vertical-align: baseline;&quot;&gt;   1         3     3      2      1
    \       /     /      / \      \
     3     2     1      1   3      2
    /     /       \                 \
   2     1         2                 3
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;http://www.leetcode.com/onlinejudge#&quot; style=&quot;background-color: transparent; border: 0px; color: blue; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
class Solution {&lt;br /&gt;
public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int numTrees(int n) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Start typing your C/C++ solution below&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // DO NOT write int main() function&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cache[n];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; n; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cache[i] = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cache[0] = 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 1; i &amp;lt; n; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // compute the count for N = i+1 nodes&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int count = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int k = 0; k &amp;lt;= i; k++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // assume [0..i] is computed&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // pick k as the root&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int left_sum = 1, right_sum = 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (k &amp;gt; 0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; left_sum = cache[k-1];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (k &amp;lt; i)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; right_sum = cache[i-k-1];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; count += left_sum*right_sum;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cache[i] = count;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return cache[n-1];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
};&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/2803766713124930567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/2803766713124930567' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/2803766713124930567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/2803766713124930567'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/12/leetcode-unique-binary-search-trees.html' title='[leetcode] unique binary search trees'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-8762378063609533962</id><published>2012-12-10T15:41:00.002-05:00</published><updated>2012-12-10T15:41:39.137-05:00</updated><title type='text'>[leetcode] flatten binary tree to linked list</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;row-even question-title&quot; id=&quot;question_114&quot; style=&quot;background-color: white; border: 1px solid rgb(255, 255, 255); color: #222222; cursor: pointer; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; font-size: 13px; line-height: 21px; margin: 0px; outline: 0px; padding: 5px 8px; vertical-align: baseline;&quot;&gt;
&lt;b style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Flatten Binary Tree to Linked List&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;row-even question-content&quot; style=&quot;background-color: white; border: 1px solid rgb(255, 255, 255); color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; font-size: 13px; line-height: 21px; margin: 0px; outline: 0px; padding: 5px 8px 5px 30px; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Given a binary tree, flatten it to a linked list in-place.&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
For example,&lt;br style=&quot;margin: 0px;&quot; /&gt;Given&lt;/div&gt;
&lt;pre style=&quot;background-attachment: scroll; background-color: #fff7f0; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border: 1px solid rgb(204, 204, 204); outline: 0px; overflow: auto; padding: 10px; vertical-align: baseline;&quot;&gt;         1
        / \
       2   5
      / \   \
     3   4   6
&lt;/pre&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
The flattened tree should look like:&lt;br style=&quot;margin: 0px;&quot; /&gt;&lt;pre style=&quot;background-attachment: scroll; background-color: #fff7f0; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border: 1px solid rgb(204, 204, 204); outline: 0px; overflow: auto; padding: 10px; vertical-align: baseline;&quot;&gt;   1
    \
     2
      \
       3
        \
         4
          \
           5
            \
             6&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;* Definition for binary tree&lt;br /&gt;
&amp;nbsp;* struct TreeNode {&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; int val;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode *left;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode *right;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode(int x) : val(x), left(NULL), right(NULL) {}&lt;br /&gt;
&amp;nbsp;* };&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
class Solution {&lt;br /&gt;
public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void flatten(TreeNode *root) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Start typing your C/C++ solution below&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // DO NOT write int main() function&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // use a &#39;pre&#39; pointer to track the predecessor of the current node&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // use pre-order traversal&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!root)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stack&lt;treenode&gt; my_stack;&lt;/treenode&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TreeNode *pre = NULL;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my_stack.push(root);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (!my_stack.empty())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TreeNode *p = my_stack.top();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // visit p&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (pre)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pre-&amp;gt;right = p;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pre-&amp;gt;left = NULL;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pre = p;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // pop current node&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my_stack.pop();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // push right and left children into stack&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (p-&amp;gt;right) my_stack.push(p-&amp;gt;right);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (p-&amp;gt;left) my_stack.push(p-&amp;gt;left);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
};&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/8762378063609533962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/8762378063609533962' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/8762378063609533962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/8762378063609533962'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/12/leetcode-flatten-binary-tree-to-linked.html' title='[leetcode] flatten binary tree to linked list'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-5345248014904243657</id><published>2012-12-10T15:19:00.000-05:00</published><updated>2012-12-10T15:19:54.396-05:00</updated><title type='text'>[leetcode] search for a range</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;row-even question-title&quot; id=&quot;question_34&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; border: 1px solid rgb(255, 255, 255); cursor: pointer; font-size: 13px; margin: 0px; outline: 0px; padding: 5px 8px; vertical-align: baseline;&quot;&gt;
&lt;b style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Search for a Range&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;row-even question-content&quot; style=&quot;background-color: white; border: 1px solid rgb(255, 255, 255); font-size: 13px; margin: 0px; outline: 0px; padding: 5px 8px 5px 30px; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Given a sorted array of integers, find the starting and ending position of a given target value.&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Your algorithm&#39;s runtime complexity must be in the order of&amp;nbsp;&lt;i style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;O&lt;/i&gt;(log&amp;nbsp;&lt;i style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;n&lt;/i&gt;).&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
If the target is not found in the array, return&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;[-1, -1]&lt;/code&gt;.&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; line-height: 21px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
For example,&lt;br style=&quot;margin: 0px;&quot; /&gt;Given&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;[5, 7, 7, 8, 8, 10]&lt;/code&gt;&amp;nbsp;and target value 8,&lt;br style=&quot;margin: 0px;&quot; /&gt;return&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;[3, 4]&lt;/code&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
class Solution {&lt;br /&gt;
public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; vector&lt;int&gt; searchRange(int A[], int n, int target) {&lt;/int&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Start typing your C/C++ solution below&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // DO NOT write int main() function&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // binary search in the given array&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int start = 0, end = n-1, mid;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vector&lt;int&gt; result;&lt;/int&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bool is_found = false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int c1 = -1, c2 = -1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (start &amp;lt;= end)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mid = (start + end) / 2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (target == A[mid])&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; is_found = true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (target &amp;gt; A[mid])&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; start = mid + 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end = mid - 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (is_found)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // move cursors&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c1 = mid, c2 = mid;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (A[c1] == target &amp;amp;&amp;amp; c1 &amp;gt;= 0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c1--;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (A[c2] == target &amp;amp;&amp;amp; c2 &amp;lt; n)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c2++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c1++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c2--;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result.push_back(c1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result.push_back(c2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return result;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
};&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/5345248014904243657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/5345248014904243657' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/5345248014904243657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/5345248014904243657'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/12/leetcode-search-for-range.html' title='[leetcode] search for a range'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-8586430338811883449</id><published>2012-12-09T22:42:00.001-05:00</published><updated>2012-12-09T22:42:15.525-05:00</updated><title type='text'>用栈操作遍历二叉树的方法</title><content type='html'>&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 23px; margin-bottom: 15px;&quot;&gt;
先序遍历。将根节点入栈，考察当前节点（即栈顶节点），先访问当前节点，然后将其出栈（已经访问过，不再需要保留），然后先将其右孩子入栈，再将其左孩子入栈（这个顺序是为了让左孩子位于右孩子上面，以便左孩子的访问先于右孩子；当然如果某个孩子为空，就不用入栈了）。如果栈非空就重复上述过程直到栈空为止，结束算法。&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 23px; margin-bottom: 15px;&quot;&gt;
中序遍历。将根节点入栈，考察当前节点（即栈顶节点），如果其左孩子未被访问过（有标记），则将其左孩子入栈，否则访问当前节点并将其出栈，再将右孩子入栈。如果栈非空就重复上述过程直到栈空为止，结束算法。&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 23px; margin-bottom: 15px;&quot;&gt;
后序遍历。将根节点入栈，考察当前节点（即栈顶节点），如果其左孩子未被访问过，则将其左孩子入栈，否则如果其右孩子未被访问过，则将其右孩子入栈，如果都已经访问过，则访问其自身，并将其出栈。如果栈非空就重复上述过程直到栈空为止，结束算法。&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/8586430338811883449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/8586430338811883449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/8586430338811883449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/8586430338811883449'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/12/blog-post.html' title='用栈操作遍历二叉树的方法'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-3919810521897253162</id><published>2012-12-09T14:32:00.001-05:00</published><updated>2012-12-09T14:32:55.285-05:00</updated><title type='text'>[leetcode] binary tree maximum path sum</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;row-odd question-title&quot; id=&quot;question_124&quot; style=&quot;background-color: #f8f8f8; border: 1px solid rgb(248, 248, 248); color: #222222; cursor: pointer; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; font-size: 13px; line-height: 21px; margin: 0px; outline: 0px; padding: 5px 8px; vertical-align: baseline;&quot;&gt;
&lt;b style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Binary Tree Maximum Path Sum&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;row-odd question-content&quot; style=&quot;background-color: #f8f8f8; border: 1px solid rgb(248, 248, 248); color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; font-size: 13px; line-height: 21px; margin: 0px; outline: 0px; padding: 5px 8px 5px 30px; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Given a binary tree, find the maximum path sum.&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
The path may start and end at any node in the tree.&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
For example:&lt;br style=&quot;margin: 0px;&quot; /&gt;Given the below binary tree,&lt;/div&gt;
&lt;pre style=&quot;background-attachment: scroll; background-color: #fff7f0; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border: 1px solid rgb(204, 204, 204); outline: 0px; overflow: auto; padding: 10px; vertical-align: baseline;&quot;&gt;       1
      / \
     2   3
&lt;/pre&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Return&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;6&lt;/code&gt;.&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Here I consider a recursive solution. We update the &#39;val&#39; field of each node with the path sum ending at that node (starting from any one of its descendants). We keep a &#39;max_sum&#39; variable to save the current maximum path sum. We update this variable using paths going through the node, paths ending at this node, and the single-node path. We traverse the binary tree once, so the time complexity is O(n).&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;* Definition for binary tree&lt;br /&gt;
&amp;nbsp;* struct TreeNode {&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; int val;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode *left;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode *right;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode(int x) : val(x), left(NULL), right(NULL) {}&lt;br /&gt;
&amp;nbsp;* };&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
class Solution {&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void max_path_helper(TreeNode *root, int &amp;amp;max_sum)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!root) return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; max_path_helper(root-&amp;gt;left, max_sum);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; max_path_helper(root-&amp;gt;right, max_sum);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int left_sum = 0, right_sum = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (root-&amp;gt;left)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; left_sum = (root-&amp;gt;left)-&amp;gt;val;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (root-&amp;gt;right)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; right_sum = (root-&amp;gt;right)-&amp;gt;val;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // update max sum&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int sum = left_sum + right_sum + root-&amp;gt;val;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int sum_left = left_sum + root-&amp;gt;val;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int sum_right = right_sum + root-&amp;gt;val;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (max_sum &amp;lt; sum)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; max_sum = sum;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (max_sum &amp;lt; sum_left)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; max_sum = sum_left;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (max_sum &amp;lt; sum_right)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; max_sum = sum_right;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (max_sum &amp;lt; root-&amp;gt;val)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; max_sum = root-&amp;gt;val;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // compare with child sums and single value at this node&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int tmp = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (left_sum &amp;gt; right_sum)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmp = root-&amp;gt;val + left_sum;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmp = root-&amp;gt;val + right_sum;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // update value&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (tmp &amp;gt; root-&amp;gt;val)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; root-&amp;gt;val = tmp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int maxPathSum(TreeNode *root) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Start typing your C/C++ solution below&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // DO NOT write int main() function&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // current max sum&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int max_sum = -999;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // for each node, compute the max sum of the path starting at this node&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // update max_sum using the max_sum&#39;s of its two subtrees&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!root)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; max_path_helper(root, max_sum);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // finally compare the current max sum with the path sum ending at root&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (max_sum &amp;lt; root-&amp;gt;val)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; max_sum = root-&amp;gt;val;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return max_sum;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
};&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/3919810521897253162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/3919810521897253162' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/3919810521897253162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/3919810521897253162'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/12/leetcode-binary-tree-maximum-path-sum.html' title='[leetcode] binary tree maximum path sum'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-4950783616515071319</id><published>2012-12-08T23:12:00.002-05:00</published><updated>2012-12-08T23:12:22.522-05:00</updated><title type='text'>[leetcode] binary tree level traversal</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;row-odd question-title&quot; id=&quot;question_102&quot; style=&quot;background-color: #f8f8f8; border: 1px solid rgb(248, 248, 248); color: #222222; cursor: pointer; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; font-size: 13px; line-height: 21px; margin: 0px; outline: 0px; padding: 5px 8px; vertical-align: baseline;&quot;&gt;
&lt;b style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Binary Tree Level Order Traversal&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;row-odd question-content&quot; style=&quot;background-color: #f8f8f8; border: 1px solid rgb(248, 248, 248); color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; font-size: 13px; line-height: 21px; margin: 0px; outline: 0px; padding: 5px 8px 5px 30px; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Given a binary tree, return the&amp;nbsp;&lt;i style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;level order&lt;/i&gt;&amp;nbsp;traversal of its nodes&#39; values. (ie, from left to right, level by level).&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
For example:&lt;br style=&quot;margin: 0px;&quot; /&gt;Given binary tree&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;{3,9,20,#,#,15,7}&lt;/code&gt;,&lt;/div&gt;
&lt;pre style=&quot;background-attachment: scroll; background-color: #fff7f0; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border: 1px solid rgb(204, 204, 204); outline: 0px; overflow: auto; padding: 10px; vertical-align: baseline;&quot;&gt;    3
   / \
  9  20
    /  \
   15   7
&lt;/pre&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
return its level order traversal as:&lt;/div&gt;
&lt;pre style=&quot;background-attachment: scroll; background-color: #fff7f0; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border: 1px solid rgb(204, 204, 204); outline: 0px; overflow: auto; padding: 10px; vertical-align: baseline;&quot;&gt;[
  [3],
  [9,20],
  [15,7]
]
&lt;/pre&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;showspoilers&quot; style=&quot;background-color: transparent; border: 0px; font-size: 11px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
confused what&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;&quot;{1,#,2,3}&quot;&lt;/code&gt;&amp;nbsp;means?&amp;nbsp;&lt;a href=&quot;http://www.leetcode.com/onlinejudge#&quot; style=&quot;background-color: transparent; border: 0px; color: blue; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;gt; read more on how binary tree is serialized on OJ.&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;* Definition for binary tree&lt;br /&gt;
&amp;nbsp;* struct TreeNode {&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; int val;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode *left;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode *right;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode(int x) : val(x), left(NULL), right(NULL) {}&lt;br /&gt;
&amp;nbsp;* };&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
class Solution {&lt;br /&gt;
public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; vector&lt;vector int=&quot;int&quot;&gt; &amp;gt; levelOrder(TreeNode *root) {&lt;/vector&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Start typing your C/C++ solution below&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // DO NOT write int main() function&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // initialize the result&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vector&lt;vector int=&quot;int&quot;&gt; &amp;gt; result;&lt;/vector&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!root)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return result;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; queue&lt;treenode&gt; my_queue;&lt;/treenode&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my_queue.push(root);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // push a dummy node into the queue&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my_queue.push(NULL);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // initialize a tmp array&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vector&lt;int&gt; tmp;&lt;/int&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (!my_queue.empty())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TreeNode *front = my_queue.front();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!front)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // process a dummy&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (tmp.size() &amp;gt; 0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result.push_back(tmp);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmp.erase(tmp.begin(), tmp.end());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my_queue.pop();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmp.push_back(front-&amp;gt;val);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my_queue.pop();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (front-&amp;gt;left) my_queue.push(front-&amp;gt;left);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (front-&amp;gt;right) my_queue.push(front-&amp;gt;right);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // check if the next node is dummy&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; front = my_queue.front();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!front)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // initialize another dummy into the queue&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my_queue.push(NULL);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return result;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
};&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/4950783616515071319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/4950783616515071319' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/4950783616515071319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/4950783616515071319'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/12/leetcode-binary-tree-level-traversal.html' title='[leetcode] binary tree level traversal'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-6958099237419376448</id><published>2012-12-08T22:05:00.000-05:00</published><updated>2012-12-08T22:05:36.541-05:00</updated><title type='text'>[leetcode] binary tree inorder traversal</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;row-even question-title&quot; id=&quot;question_94&quot; style=&quot;background-color: white; border: 1px solid rgb(255, 255, 255); color: #222222; cursor: pointer; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; font-size: 13px; line-height: 21px; margin: 0px; outline: 0px; padding: 5px 8px; vertical-align: baseline;&quot;&gt;
&lt;b style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Binary Tree Inorder Traversal&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;row-even question-content&quot; style=&quot;background-color: white; border: 1px solid rgb(255, 255, 255); color: #222222; font-family: &#39;Helvetica Neue&#39;, arial, sans-serif; font-size: 13px; line-height: 21px; margin: 0px; outline: 0px; padding: 5px 8px 5px 30px; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Given a binary tree, return the&amp;nbsp;&lt;i style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;inorder&lt;/i&gt;&amp;nbsp;traversal of its nodes&#39; values.&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
For example:&lt;br style=&quot;margin: 0px;&quot; /&gt;Given binary tree&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;{1,#,2,3}&lt;/code&gt;,&lt;/div&gt;
&lt;pre style=&quot;background-attachment: scroll; background-color: #fff7f0; background-image: none; background-position: 0px 0px; background-repeat: repeat repeat; border: 1px solid rgb(204, 204, 204); outline: 0px; overflow: auto; padding: 10px; vertical-align: baseline;&quot;&gt;   1
    \
     2
    /
   3
&lt;/pre&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
return&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;[1,3,2]&lt;/code&gt;.&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;b style=&quot;background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Note:&lt;/b&gt;&amp;nbsp;Recursive solution is trivial, could you do it iteratively?&lt;/div&gt;
&lt;div class=&quot;showspoilers&quot; style=&quot;background-color: transparent; border: 0px; font-size: 11px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
confused what&amp;nbsp;&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; outline: 0px; padding: 1px 5px; vertical-align: baseline;&quot;&gt;&quot;{1,#,2,3}&quot;&lt;/code&gt;&amp;nbsp;means?&amp;nbsp;&lt;a href=&quot;http://www.leetcode.com/onlinejudge#&quot; style=&quot;background-color: transparent; border: 0px; color: blue; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;gt; read more on how binary tree is serialized on OJ.&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;* Definition for binary tree&lt;br /&gt;
&amp;nbsp;* struct TreeNode {&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; int val;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode *left;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode *right;&lt;br /&gt;
&amp;nbsp;* &amp;nbsp; &amp;nbsp; TreeNode(int x) : val(x), left(NULL), right(NULL) {}&lt;br /&gt;
&amp;nbsp;* };&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
class Solution {&lt;br /&gt;
public:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; vector&lt;int&gt; inorderTraversal(TreeNode *root) {&lt;/int&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Start typing your C/C++ solution below&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // DO NOT write int main() function&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stack&lt;treenode&gt; my_stack;&lt;/treenode&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TreeNode *p = root;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vector&lt;int&gt; result;&lt;/int&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!p)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return result;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (p)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my_stack.push(p);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p = p-&amp;gt;left;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (!my_stack.empty())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TreeNode *top = my_stack.top();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my_stack.pop();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result.push_back(top-&amp;gt;val);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p = top-&amp;gt;right;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (p)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my_stack.push(p);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p = p-&amp;gt;left;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return result;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
};&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/6958099237419376448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/6958099237419376448' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/6958099237419376448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/6958099237419376448'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/12/leetcode-binary-tree-inorder-traversal.html' title='[leetcode] binary tree inorder traversal'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-5730377043505481056</id><published>2012-11-28T15:21:00.002-05:00</published><updated>2012-11-28T15:21:49.952-05:00</updated><title type='text'>Mark Cuban 演讲小结</title><content type='html'>&lt;span style=&quot;background-color: white; font-family: ff-tisa-web-pro-1, ff-tisa-web-pro-2, &#39;Lucida Grande&#39;, &#39;Hiragino Sans GB&#39;, &#39;Hiragino Sans GB W3&#39;; font-size: 14px; line-height: 22px;&quot;&gt;刚刚去听了Mark Cuban的演讲，Mark Cuban是Indiana的校友，美国商界的精英，曾经已59亿美金的天价将自己的一个IT公司卖给了雅虎，现在是小牛队的老板。和Mark近距离接触的感觉和屏幕上看到的很相似，非常地passionate，言谈举止非常地坚定，说话也非常风趣幽默。&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: ff-tisa-web-pro-1, ff-tisa-web-pro-2, &#39;Lucida Grande&#39;, &#39;Hiragino Sans GB&#39;, &#39;Hiragino Sans GB W3&#39;; font-size: 14px; line-height: 22px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;简单总结一下这次地收获吧：&lt;br /&gt;&lt;span style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;1. 创业远远不是只有idea就行的，绝对不是你和一帮兄弟喝着啤酒海阔天空地扯扯淡就能做好的。创业需要的是preparation，也就是说你要对你所要做的东西了解地非常透彻，要做到比任何人都要懂你做地东西。这一点李开复演讲地时候也是常强调的。&lt;br /&gt;&lt;span style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;2. &amp;nbsp;有个学生提问时说，“failures are necessary for success”，然后问Mark经历过什么样的失败，才成就了今天的成功。Mark很可爱地说他似乎没经历过什么failure，然后哈哈大笑说“Failures only belong to losers”！其实不管是成功还是失败，最重要地是你从这段经历中学到了什么，有什么样的教训，让你有了怎样地成长。另外，所谓“failure”，可能从来都不存在于“成功”的字典里；相信自己会成功的人才会真正成功。&lt;br /&gt;&lt;span style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;3. 关于人生理想和自身定位。Mark说自己当时创建公司时，自己的目标就是在35岁之前把公司做大，然后在35岁的时候退休，去做自己喜欢做的事情（比如说现在经营NBA小牛队）。永远不要让你后悔自己的人生，人生每个阶段都有需要去做的事情，不要到老的时候去后悔。&lt;br /&gt;&lt;span style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;4. 中间有个小插曲。Mark在开场的时候说他曾经投资过无数个公司，别人一封email，即使甚至连人都没见过，他也可能会投资给那个人。演讲快到最后的时候，有个美国学生站起来说，我现在在做怎样怎样的business，目前的情况是blablabla，问Mark有没有兴趣给他投资。。。得到的答案当然是BIG NO，呵呵。不过还是祝愿他能成功。&lt;br /&gt;&lt;span style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;5. 真正成功的人是自己能把生活过的有滋有味的，热爱生活的人才会活的自信开心，才散发魅力会吸引周围的人。所以一个人的事业和生活是分不开的，要build好自己的personality，要热爱生活，要有强烈的passion，要有改变未来的勇气。&lt;br /&gt;&lt;span style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;我正在努力：）&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/5730377043505481056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/5730377043505481056' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/5730377043505481056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/5730377043505481056'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/11/mark-cuban.html' title='Mark Cuban 演讲小结'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-4722135268127706515</id><published>2012-11-17T19:33:00.001-05:00</published><updated>2012-11-17T19:33:18.855-05:00</updated><title type='text'>预防癌症的１４条膳食准则</title><content type='html'>&lt;span style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot;&gt;　　１９９７年９月，由美国癌症研究所的世界癌症研究基金会联合推出了一本名为“食物、营养与癌症预防”的志著，该书由８个国家的１６位著名营养学、肿瘤学专家花了３年时间集体编写而成的。本专著是对近１５年间世界各地在此领域的文献资料进行的总结晶阐述了膳食模式与癌症的关系以及膳食与癌症的发生、发展过程的关系，分析了不同部位癌症与食物和营养的关系，然后描述不同癌症的危险性与各种膳食成分（食物、营养素）及食物加工的关系，最后根据上述科学依据，提出了一套全球性的预防癌症的１４条膳食准则，其内容如下：&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot;&gt;　　食物供应和进食及相关因素&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot;&gt;　　１·食物供应和进食：摄取以植物性食物为主的营养充分和多种食物品种的膳食，主要选择植物来源的食物，如蔬菜、水果、豆类和加工度比较低的谷类。&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot;&gt;　　２·保持体重：成年人群的体质数范围在２１－２３，因此，个体的体质指数［体重kg／身高2(m2)］应保持在１８.５与２５之间，避免体重过低或超重，在成年期体重的增加应限制在５kg以内。&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot;&gt;　　３·坚持体力活动：终身坚持体力活动，如果工作时体力较少，每天应进行１小时，或进行相类似的活动量。每周还应适当安排到少有较剧烈的活动１小时。&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot;&gt;　　食物和饮料&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot;&gt;　　４·蔬菜和水果：全年都吃各种不同的蔬菜和水果，每天量应在４００－８００g。&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot;&gt;　　５·其它植物性食物：每天吃各种富含淀粉或富含蛋白质的加工较低的谷类、豆类、根茎类食物６００－８００g，其总能量应占４５％－６０％，少吃精制糖。&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot;&gt;　　６·含酒精饮料：鼓励不饮酒或不过量饮酒，如果饮酒，男性每天限饮两份，女性限饮一份（每份酒的含义为啤酒２００ml、果酒１００ml、或烈性白酒２５ml）。&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot;&gt;　　７·肉类：如果吃肉，每日红肉（如猪肉、牛羊肉等）的摄取量应少于８０g，最好选择鱼类禽类或非家禽动物代替肉类。&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot;&gt;　　８·总脂肪和油类：限制摄入含脂肪较多的动物性食物，摄入适量的植物油，油脂的能量占总能量的１５％－３０％以下。&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot;&gt;　　９·盐和腌制：减少食盐的总摄取量，成人限制在每天６g以下，减少烹调用食盐和摄入腌制食品。&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot;&gt;　　１０·贮存：易腐败的食物应妥善贮存以减少霉菌。避免吃贮存期长、受霉菌污染的食物。&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot;&gt;　　１１·保藏：易腐败的食物，如不能及时吃掉，应冷冻或冷藏。&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot;&gt;　　１２·添加剂及农药残留量：建立和监测对食物中食品添加剂、农药及残留量和其它化学污染物的限量，保证在规定范围内的食物添加剂和农药残留量不致产生有害作用，在发展中国家尤应注意这方面的临监测。&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot;&gt;　　１３·烹调：不要吃烧焦的食物。避免将肉和鱼烧焦，尽量少吃火焰上直接熏烤的食物，鼓励用比较低的温度烹调食品。&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot;&gt;　　１４·膳食补充剂：采用有利于减少癌症的危险的膳食模式，而不用膳食补充剂。如果能遵循上述膳食建议，很可能没必要用膳食补充剂，而且膳食补充剂对减少癌症危险并无帮助。&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: 宋体, Arial, &#39;Arial Black&#39;, &#39;Arial Narrow&#39;, Century; font-size: 14px; line-height: 24px;&quot; /&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/4722135268127706515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/4722135268127706515' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/4722135268127706515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/4722135268127706515'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/11/blog-post.html' title='预防癌症的１４条膳食准则'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-6820281783639018445</id><published>2012-11-12T21:17:00.001-05:00</published><updated>2012-11-12T21:17:32.238-05:00</updated><title type='text'>[ZZ] 自学算法之路 </title><content type='html'>&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
现在真的在自学算法，努力按照以下阶段复习中，争取做到倒背如流&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
第一阶段：练经典常用算法，下面的每个算法给我打上十到二十遍，同时自己精简代码，&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
因为太常用，所以要练到写时不用想，10-15分钟内打完，甚至关掉显示器都可以把程序打&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
出来.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
1.最短路(Floyd、Dijstra,BellmanFord)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
2.最小生成树(先写个prim,kruscal要用并查集，不好写)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
3.大数（高精度）加减乘除&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
4.二分查找. (代码可在五行以内)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
5.叉乘、判线段相交、然后写个凸包.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
6.BFS、DFS,同时熟练hash表(要熟，要灵活,代码要简)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
7.数学上的有：辗转相除（两行内），线段交点、多角形面积公式.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
8. 调用系统的qsort, 技巧很多，慢慢掌握.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
9. 任意进制间的转换&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
第二阶段：练习复杂一点，但也较常用的算法。&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
如：&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
1. 二分图匹配（匈牙利），最小路径覆盖&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
2. 网络流，最小费用流。&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
3. 线段树.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
4. 并查集。&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
5. 熟悉动态规划的各个典型：LCS、最长递增子串、三角剖分、记忆化dp&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
6.博弈类算法。博弈树，二进制法等。&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
7.最大团，最大独立集。&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
8.判断点在多边形内。&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
9. 差分约束系统.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
10. 双向广度搜索、A*算法，最小耗散优先.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
相关的知识&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
图论&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;路径问题&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0/1边权最短路径&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BFS&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;非负边权最短路径（Dijkstra）&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;可以用Dijkstra解决问题的特征&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;负边权最短路径&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Bellman-Ford&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Bellman-Ford的Yen-氏优化&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;差分约束系统&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Floyd&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;广义路径问题&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;传递闭包&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;极小极大距离 / 极大极小距离&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Euler Path / Tour&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;圈套圈算法&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;混合图的 Euler Path / Tour&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Hamilton Path / Tour&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;特殊图的Hamilton Path / Tour 构造&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;生成树问题&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;最小生成树&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;第k小生成树&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;最优比率生成树&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0/1分数规划&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;度限制生成树&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;连通性问题&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;强大的DFS算法&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;无向图连通性&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;割点&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;割边&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;二连通分支&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;有向图连通性&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;强连通分支&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2-SAT&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;最小点基&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;有向无环图&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;拓扑排序&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;有向无环图与动态规划的关系&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;二分图匹配问题&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;一般图问题与二分图问题的转换思路&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;最大匹配&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;有向图的最小路径覆盖&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 / 1矩阵的最小覆盖&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;完备匹配&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;最优匹配&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;稳定婚姻&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;网络流问题&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;网络流模型的简单特征和与线性规划的关系&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;最大流最小割定理&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;最大流问题&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;有上下界的最大流问题&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;循环流&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;最小费用最大流 / 最大费用最大流&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;弦图的性质和判定&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
组合数学&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;解决组合数学问题时常用的思想&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;逼近&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;递推 / 动态规划&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;概率问题&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Polya定理&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
计算几何 / 解析几何&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;计算几何的核心：叉积 / 面积&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;解析几何的主力：复数&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;基本形&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;点&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;直线，线段&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;多边形&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;凸多边形 / 凸包&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;凸包算法的引进，卷包裹法&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Graham扫描法&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;水平序的引进，共线凸包的补丁&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;完美凸包算法&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;相关判定&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;两直线相交&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;两线段相交&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;点在任意多边形内的判定&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;点在凸多边形内的判定&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;经典问题&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;最小外接圆&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;近似O(n)的最小外接圆算法&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;点集直径&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;旋转卡壳，对踵点&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;多边形的三角剖分&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
数学 / 数论&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;最大公约数&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Euclid算法&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;扩展的Euclid算法&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;同余方程 / 二元一次不定方程&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;同余方程组&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;线性方程组&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;高斯消元法&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;解mod 2域上的线性方程组&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;整系数方程组的精确解法&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;矩阵&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;行列式的计算&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;利用矩阵乘法快速计算递推关系&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;分数&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;分数树&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;连分数逼近&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;数论计算&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;求N的约数个数&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;求phi(N)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;求约数和&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;快速数论变换&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;……&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;素数问题&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;概率判素算法&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;概率因子分解&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
数据结构&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;组织结构&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;二叉堆&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;左偏树&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;二项树&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;胜者树&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;跳跃表&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;样式图标&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;斜堆&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;reap&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;统计结构&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;树状数组&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;虚二叉树&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;线段树&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;矩形面积并&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;圆形面积并&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;关系结构&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Hash表&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;并查集&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;路径压缩思想的应用&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;STL中的数据结构&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;vector&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;deque&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set / map&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
动态规划 / 记忆化搜索&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp;动态规划和记忆化搜索在思考方式上的区别&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;最长子序列系列问题&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;最长不下降子序列&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;最长公共子序列&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;最长公共不下降子序列&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;一类NP问题的动态规划解法&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;树型动态规划&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;背包问题&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;动态规划的优化&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;四边形不等式&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;函数的凸凹性&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;状态设计&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;规划方向&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
线性规划&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
常用思想&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;二分 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;最小表示法&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
串&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;KMP &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Trie结构&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;后缀树/后缀数组 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LCA/RMQ&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;有限状态自动机理论&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
排序&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;选择/冒泡 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;快速排序 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;堆排序 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;归并排序&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;基数排序 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;拓扑排序 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;排序网络&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
中级:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
一.基本算法:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(1)C++的标准模版库的应用. (poj3096,poj3007)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(2)较为复杂的模拟题的训练(poj3393,poj1472,poj3371,poj1027,poj2706)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
二.图算法:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(1)差分约束系统的建立和求解. (poj1201,poj2983)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(2)最小费用最大流(poj2516,poj2516,poj2195)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(3)双连通分量(poj2942)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(4)强连通分支及其缩点.(poj2186)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(5)图的割边和割点(poj3352)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(6)最小割模型、网络流规约(poj3308, )&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
三.数据结构.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(1)线段树. (poj2528,poj2828,poj2777,poj2886,poj2750)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(2)静态二叉检索树. (poj2482,poj2352)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(3)树状树组(poj1195,poj3321)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(4)RMQ. (poj3264,poj3368)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(5)并查集的高级应用. (poj1703,2492)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(6)KMP算法. (poj1961,poj2406)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
四.搜索&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(1)最优化剪枝和可行性剪枝&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(2)搜索的技巧和优化 (poj3411,poj1724)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(3)记忆化搜索(poj3373,poj1691)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
五.动态规划&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(1)较为复杂的动态规划(如动态规划解特别的施行商问题等)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(poj1191,poj1054,poj3280,poj2029,poj2948,poj1925,poj3034)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(2)记录状态的动态规划. (POJ3254,poj2411,poj1185)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(3)树型动态规划(poj2057,poj1947,poj2486,poj3140)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
六.数学&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(1)组合数学:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.容斥原理.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2.抽屉原理.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3.置换群与Polya定理(poj1286,poj2409,poj3270,poj1026).&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4.递推关系和母函数.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(2)数学.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.高斯消元法(poj2947,poj1487, poj2065,poj1166,poj1222)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2.概率问题. (poj3071,poj3440)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3.GCD、扩展的欧几里德(中国剩余定理) (poj3101)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(3)计算方法.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.0/1分数规划. (poj2976)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2.三分法求解单峰(单谷)的极值.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3.矩阵法(poj3150,poj3422,poj3070)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4.迭代逼近(poj3301)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(4)随机化算法(poj3318,poj2454)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(5)杂题.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(poj1870,poj3296,poj3286,poj1095)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
七.计算几何学.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(1)坐标离散化.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(2)扫描线算法(例如求矩形的面积和周长并,常和线段树或堆一起使用).&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(poj1765,poj1177,poj1151,poj3277,poj2280,poj3004)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(3)多边形的内核(半平面交)(poj3130,poj3335)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(4)几何工具的综合应用.(poj1819,poj1066,poj2043,poj3227,poj2165,poj3429)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
高级:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
一.基本算法要求: &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(1)代码快速写成,精简但不失风格 &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(poj2525,poj1684,poj1421,poj1048,poj2050,poj3306)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(2)保证正确性和高效性. poj3434&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
二.图算法:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(1)度限制最小生成树和第K最短路. (poj1639)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(2)最短路,最小生成树,二分图,最大流问题的相关理论(主要是模型建立和求解)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(poj3155, poj2112,poj1966,poj3281,poj1087,poj2289,poj3216,poj2446&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(3)最优比率生成树. (poj2728)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(4)最小树形图(poj3164)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(5)次小生成树.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(6)无向图、有向图的最小环 &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
三.数据结构. &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(1)trie图的建立和应用. (poj2778)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(2)LCA和RMQ问题(LCA(最近公共祖先问题) 有离线算法(并查集+dfs) 和 在线算法&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(RMQ+dfs)).(poj1330)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(3)双端队列和它的应用(维护一个单调的队列,常常在动态规划中起到优化状态转移的&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;目的). (poj2823)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(4)左偏树(可合并堆). &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(5)后缀树(非常有用的数据结构,也是赛区考题的热点).&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(poj3415,poj3294)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
四.搜索 &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(1)较麻烦的搜索题目训练(poj1069,poj3322,poj1475,poj1924,poj2049,poj3426)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(2)广搜的状态优化:利用M进制数存储状态、转化为串用hash表判重、按位压缩存储状态、双向广搜、A*算法. (poj1768,poj1184,poj1872,poj1324,poj2046,poj1482)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(3)深搜的优化:尽量用位运算、一定要加剪枝、函数参数尽可能少、层数不易过大、可以考虑双向搜索或者是轮换搜索、IDA*算法. (poj3131,poj2870,poj2286)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
五.动态规划 &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(1)需要用数据结构优化的动态规划.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(poj2754,poj3378,poj3017)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(2)四边形不等式理论.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(3)较难的状态DP(poj3133)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
六.数学 &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(1)组合数学.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.MoBius反演(poj2888,poj2154)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2.偏序关系理论.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(2)博奕论.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.极大极小过程(poj3317,poj1085)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2.Nim问题.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
七.计算几何学. &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(1)半平面求交(poj3384,poj2540)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(2)可视图的建立(poj2966)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(3)点集最小圆覆盖.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(4)对踵点(poj2079)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;八.综合题.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;(poj3109,poj1478,poj1462,poj2729,poj2048,poj3336,poj3315,poj2148,poj1263)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
初期:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
一.基本算法:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(3)递归和分治法. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(4)递推.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(5)构造法.(poj3295) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(6)模拟法.(poj1068,poj2632,poj1573,poj2993,poj2996)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
二.图算法:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(1)图的深度优先遍历和广度优先遍历.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(2)最短路径算法(dijkstra,bellman-ford,floyd,heap+dijkstra)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(poj1860,poj3259,poj1062,poj2253,poj1125,poj2240)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(3)最小生成树算法(prim,kruskal)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(poj1789,poj2485,poj1258,poj3026)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(4)拓扑排序 (poj1094)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(5)二分图的最大匹配 (匈牙利算法) (poj3041,poj3020)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(6)最大流的增广路算法(KM算法). (poj1459,poj3436)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
三.数据结构.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(1)串 (poj1035,poj3080,poj1936)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(2)排序(快排、归并排(与逆序数有关)、堆排) (poj2388,poj2299)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(3)简单并查集的应用.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(4)哈希表和二分查找等高效查找法(数的Hash,串的Hash) &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(poj3349,poj3274,POJ2151,poj1840,poj2002,poj2503)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(5)哈夫曼树(poj3253)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(6)堆&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(7)trie树(静态建树、动态建树) (poj2513)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
四.简单搜索&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(1)深度优先搜索 (poj2488,poj3083,poj3009,poj1321,poj2251)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(2)广度优先搜索(poj3278,poj1426,poj3126,poj3087.poj3414)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(3)简单搜索技巧和剪枝(poj2531,poj1416,poj2676,1129)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
五.动态规划&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(1)背包问题. (poj1837,poj1276)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(2)型如下表的简单DP(可参考lrj的书 page149):&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;1.E[j]=opt{D+w(i,j)} (poj3267,poj1836,poj1260,poj2533)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;2.E[i,j]=opt{D[i-1,j]+xi,D[i,j-1]+yj,D[i-1][j-1]+zij} (最长公共子序列) &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(poj3176,poj1080,poj1159)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;3.C[i,j]=w[i,j]+opt{C[i,k-1]+C[k,j]}.(最优二分检索树问题)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
六.数学&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(1)组合数学:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.加法原理和乘法原理.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2.排列组合.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3.递推关系.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(POJ3252,poj1850,poj1019,poj1942)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(2)数论.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.素数与整除问题&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2.进制位.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3.同余模运算.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(poj2635, poj3292,poj1845,poj2115)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(3)计算方法.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.二分法求解单调函数相关知识.(poj3273,poj3258,poj1905,poj3122)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
七.计算几何学.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(1)几何公式.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(2)叉积和点积的运用(如线段相交的判定,点到线段的距离等). (poj2031,poj1039)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(3)多边型的简单算法(求面积)和相关判定(点在多边型内,多边型是否相交)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(poj1408,poj1584)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Tahoma, Verdana, STHeiTi, simsun, sans-serif; font-size: 14px; line-height: 1.4; margin-bottom: 0.8em; padding: 0px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;(4)凸包. (poj2187,poj1113)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/6820281783639018445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/6820281783639018445' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/6820281783639018445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/6820281783639018445'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/11/zz.html' title='[ZZ] 自学算法之路 '/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-4679730219739589921</id><published>2012-09-12T10:53:00.001-04:00</published><updated>2012-09-12T10:58:37.428-04:00</updated><title type='text'>九月英伦行</title><content type='html'>上周完成了自己到美国以后第一次“出国游”，目的地是英国伦敦。作为一名PhD学生，平时确实很忙，即使有假期，也都大部分用在了学习和工作上面，所以不常有能自由自在出去长途旅行的机会。这次去英国当然还是假借开会的名义啦，我是周三（九月五号）做presentation，所以之后的九月六号到九月九号就成了自由自在到处赶场的时间。时间不多，只有四天，所以只能去伦敦及附近几个地方看看。和所有的travel blog一样，下面就开始流水账啦。&lt;br /&gt;
&lt;br /&gt;
第一天（九月六号）：

首先之前开会的时候结识了两个游伴，来自美国马里兰大学的Z同学以及在国内上交读博士的J同学。由于他们第二天下午就要赶返程的飞机，我们决定今天上午去剑桥（cambridge），下午晚些时候去伦敦泰晤士河边欣赏一下傍晚伦敦的风景，晚上再到伦敦的中国城（chinatown）败一顿中餐。我是蛮随兴的一个人，出去玩之前不喜欢做特别详细的计划，所有计划都是前一天晚上才敲定。&lt;br /&gt;
&lt;br /&gt;
开会的地方是在Guildford，一个距离伦敦西南方向大概40分钟火车的小镇，也是Surrey区的首府。我们从Guildford出发，到伦敦Waterloo车站转乘去King&#39;s Cross车站的地铁，再换乘去Cambridge的火车。早上九点左右出发，到达Cambridge的时候大概是上午11点半了。&lt;br /&gt;
&lt;br /&gt;
剑桥这个地方自是不用多介绍的，有着800多年历史的剑桥大学就在这里，也是徐志摩曾经“轻轻的来”又“轻轻的走”的地方。剑桥大学最著名的景点是国王学院（King‘s College），有将近600年的历史，而且仍然保存的非常完好。在剑桥很有意思的一个旅行项目是撑船（punting），基本上就是中国的撑篙，只不过这里的“篙”是金属做的，蛮重，撑起来很费力。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: bottom;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG2tfHfv7Wc-IeLzAaJaG88qh7XckHBIbdKt2UrJTuqhX9bek2_Fv46KnZUmzvS-apOqhN0OVN0wYmHMy1jjp9oGLcYHq51UPJV8Z0YFrU80S4XYXR60nMTx_egaPMlkMf_aLSN9U9odtx/s1600/DSC_0028.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG2tfHfv7Wc-IeLzAaJaG88qh7XckHBIbdKt2UrJTuqhX9bek2_Fv46KnZUmzvS-apOqhN0OVN0wYmHMy1jjp9oGLcYHq51UPJV8Z0YFrU80S4XYXR60nMTx_egaPMlkMf_aLSN9U9odtx/s640/DSC_0028.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
给我们撑船的是剑桥大学机械工程的学生，据说干这个的很多都是学生。在学校里你也可以看到零零散散拉客去游船的人，他们大部分也都是当地的学生。这样的课余生活还是蛮有意思的：）&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg322uJNMuErY3bNGEHC9hQpSV9VCsUZDNph8wUTcBZ7GA-saf9NkWaIOqTfUvNbjs54-1wNVWs4p63DnyYgPg71XTWW-Fq5-Rw3-jC5y9cvo96XuHvpSH8PjnUdVLISylASnYs_sArGvU9/s1600/DSC_0034.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg322uJNMuErY3bNGEHC9hQpSV9VCsUZDNph8wUTcBZ7GA-saf9NkWaIOqTfUvNbjs54-1wNVWs4p63DnyYgPg71XTWW-Fq5-Rw3-jC5y9cvo96XuHvpSH8PjnUdVLISylASnYs_sArGvU9/s640/DSC_0034.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
河岸上闲适的人们。等自己以后退休了，一定会找一个这样宁静的小镇，每天躺在阳光下，静静的享受人生：）&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
整个游船的时间大约是40分钟。上岸后我们直接进去国王学院参观，有专门的游客通道，门票是5英镑（学生票）。同行的两位朋友没有带学生证，我用我一个人美国的学生卡竟然买到了三张学生票，英国人还是蛮nice的。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxvCJRMArfSFO477q1FXYQnzgEfZdmaeBEL9QgpPQXyl2uVUuDTJzzskva3wn9elIEXHW4V6hi-gftswnSCBl9KPESa__Wvsx9SUy-PMmBbXZl7uDO342rdP88uiwcpzJgYi9EZESSFdV9/s1600/DSC_0058.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxvCJRMArfSFO477q1FXYQnzgEfZdmaeBEL9QgpPQXyl2uVUuDTJzzskva3wn9elIEXHW4V6hi-gftswnSCBl9KPESa__Wvsx9SUy-PMmBbXZl7uDO342rdP88uiwcpzJgYi9EZESSFdV9/s640/DSC_0058.jpg&quot; width=&quot;428&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
国王学院里边空间非常大，墙壁上是典型的中世纪英国的浮雕，高高在上的窗户将外面的阳光带进来，让室内的光线变得非常柔和舒服。很难想象这是近600年前建筑师的作品，倘若放在我们中国，能保存的如此完整么？&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5r-LYF3gT3QLqNG_XbeU5w1ldgsbeCJNQqA82BC3cgg2vrS0h9HSKd3fOrhW8VodSq9zggZSRAThoNUPUyvHyd-07hgTVxZnA9sL6hcd6Hbw7EQR73tB0zjPRmT_cm8vQLiFvsCiPBD26/s1600/DSC_0072.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5r-LYF3gT3QLqNG_XbeU5w1ldgsbeCJNQqA82BC3cgg2vrS0h9HSKd3fOrhW8VodSq9zggZSRAThoNUPUyvHyd-07hgTVxZnA9sL6hcd6Hbw7EQR73tB0zjPRmT_cm8vQLiFvsCiPBD26/s640/DSC_0072.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
这是我在国王学院门前的留影：）&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh45O6CoLc-CI6_VoIwergxINGJpkGi28JcTC1Zq3CeWP1jXn3bHFYZ2yPHniCFzBlx-Br5lftDJ7LQmBmx_7mZj8_EH7NqXu6bkKx5DZtTPTxNlBpVGAYF1LULHTsgVWcmFK9WRJ8ujT-7/s1600/DSC_0091.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh45O6CoLc-CI6_VoIwergxINGJpkGi28JcTC1Zq3CeWP1jXn3bHFYZ2yPHniCFzBlx-Br5lftDJ7LQmBmx_7mZj8_EH7NqXu6bkKx5DZtTPTxNlBpVGAYF1LULHTsgVWcmFK9WRJ8ujT-7/s640/DSC_0091.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
轻轻的，我走了，正如我轻轻的来：）&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEvQ4rpl-DJIKNc6nabWT9sqeUZivCssXnZK7Q0sQ7R0njwLBy7oJv3gIyHfGgb1r3QCQE6aok82M49cDgLRo0bM0z-Imm9DPUT_mjspHyyR08x0yGIw6E3ONTY0RWQnAVlkmFmAo5ZSfB/s1600/DSC_0081.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEvQ4rpl-DJIKNc6nabWT9sqeUZivCssXnZK7Q0sQ7R0njwLBy7oJv3gIyHfGgb1r3QCQE6aok82M49cDgLRo0bM0z-Imm9DPUT_mjspHyyR08x0yGIw6E3ONTY0RWQnAVlkmFmAo5ZSfB/s640/DSC_0081.jpg&quot; width=&quot;428&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
螳螂捕蝉，黄雀在后：）&lt;br /&gt;
&lt;br /&gt;
我们午饭选择了吃回转寿司。到美国以后发现自己很喜欢吃日餐，但是日餐确实也贵的够可以。我吃了四分sushi（每份大概两到三个寿司），一共花了18英镑。这里不再上图。&lt;br /&gt;
&lt;br /&gt;
下午四点多钟坐火车回到伦敦，直接转到waterloo车站下车。伦敦最有名的景点都在这附近，零零散散的坐落在泰晤士河的沿岸。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7BgiTwZ5kt6FuGvBkcgK7PSYRfsm6I36jFTKMn5CP6FxJaoDqHQ_TPbx1MB2GM_Hg7jrT5aA6ANaMO6NZYyRQJ5OtoUNjfoddhJFqKcaatIIhzectp8fbNltNODetNodwiDQ7hUHaFWJD/s1600/DSC_0126.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7BgiTwZ5kt6FuGvBkcgK7PSYRfsm6I36jFTKMn5CP6FxJaoDqHQ_TPbx1MB2GM_Hg7jrT5aA6ANaMO6NZYyRQJ5OtoUNjfoddhJFqKcaatIIhzectp8fbNltNODetNodwiDQ7hUHaFWJD/s640/DSC_0126.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
和Z同学的搞怪合影：）Z同学可是中科大的才女哦，人也超nice的。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgItp8t5tT7q0FayTUd8vDezoMt08F6yIgxpGHPYpyIgMwvpUzikD4hhM1Z27tDVE8tiX-LAbUYQj2YFRS13GltdX6VyGE1uV846T77A6EW2N1vkxWvx5-U5jrm1ymRnXb946jGqN3eUUna/s1600/DSC_0140.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgItp8t5tT7q0FayTUd8vDezoMt08F6yIgxpGHPYpyIgMwvpUzikD4hhM1Z27tDVE8tiX-LAbUYQj2YFRS13GltdX6VyGE1uV846T77A6EW2N1vkxWvx5-U5jrm1ymRnXb946jGqN3eUUna/s640/DSC_0140.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
威斯敏斯特大教堂，众英王都葬在这里。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEindRXa4ThWQoOkb-XPnHmj0GiO74c-stYz54_z5JQkoc6Zih7Uwb-un-CFj9wVFJQIwy0ttCs__xvSfcKaizt8ctaLJITmpyzKDJYZ1ibPHQ2nbulAdqvFUOFM3wa3ttZDTPXhEO69EU7k/s1600/DSC_0137.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEindRXa4ThWQoOkb-XPnHmj0GiO74c-stYz54_z5JQkoc6Zih7Uwb-un-CFj9wVFJQIwy0ttCs__xvSfcKaizt8ctaLJITmpyzKDJYZ1ibPHQ2nbulAdqvFUOFM3wa3ttZDTPXhEO69EU7k/s640/DSC_0137.jpg&quot; width=&quot;428&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
傍晚的伦敦眼（london eye）。据说在上面可以鸟瞰伦敦的夜景，不过这次没有上，我要留给以后未来的GF。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
伦敦的Chinatown里这里也不远，我们步行过去大概用了20多分钟，选定了一家川菜馆（J同学是重庆人）。忘记了具体中文名字了，貌似是叫“峨眉”blabla，英文名是“imperial sichuan”。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIm69figDex0JA-5-ZCDX5QMF6eT4q3DeY-e01KrHtTnuG9MFcle1SUIhxHiZBpW5Zd99ubD7s5kB71dssWj9JrLydXpv61Y1x4R8GaP7l_GRGvJd39zcLzVPDdUIvhRoRjIDHnsf0kAow/s1600/DSC_0149.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIm69figDex0JA-5-ZCDX5QMF6eT4q3DeY-e01KrHtTnuG9MFcle1SUIhxHiZBpW5Zd99ubD7s5kB71dssWj9JrLydXpv61Y1x4R8GaP7l_GRGvJd39zcLzVPDdUIvhRoRjIDHnsf0kAow/s640/DSC_0149.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
真的很好吃！当然价格也不菲，三个人一共吃了70多英镑！&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
第一天的行程圆满结束，我们晚上十一点半左右返回了我们的大本营Guildford。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
第二天（九月七号）：我们计划今天去大英博物馆（The British Museum）。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
这一天的行程还是有些尴尬，由于没有提前确定清楚，我们提着行李箱到了博物馆（两个朋友今天下午的飞机，而我要转场到住到伦敦）。但是被门口的黑人大叔告知不能带大件行李进入博物馆。无可奈何，由于两个朋友今天最后一天在伦敦，所以我自告奋勇给大家看了一下午行李。我两天之后才走，因此还有机会再来：）&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi51XyEI6ZdnK_7aME94ovoiRurd6i8at6DQ63dP_xMeUTlZ2JzvE3688rIK-R_3CApfkmLKNFeZwU9gufd-i_5kr4omnzFQS_ppWQ0wEGrADxteMxBLceKseZVYl8YahZADk8a-WlS4sJG/s1600/DSC_0003.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi51XyEI6ZdnK_7aME94ovoiRurd6i8at6DQ63dP_xMeUTlZ2JzvE3688rIK-R_3CApfkmLKNFeZwU9gufd-i_5kr4omnzFQS_ppWQ0wEGrADxteMxBLceKseZVYl8YahZADk8a-WlS4sJG/s640/DSC_0003.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
大英博物馆的正面照。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-CxZSknBJoWrvO2NbYh8U0wJNohShrf9oo6VdO4wqz5ygkh5tXRITPAbeAnYwxfpTGrVNFFEoVjnm6G9IM3tbD_bTMgG9ZzAhUghv1qVKzpP14MaTvk-uhbRnPrPSJE5sqxlj0RYPcpk3/s1600/DSC_0007.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-CxZSknBJoWrvO2NbYh8U0wJNohShrf9oo6VdO4wqz5ygkh5tXRITPAbeAnYwxfpTGrVNFFEoVjnm6G9IM3tbD_bTMgG9ZzAhUghv1qVKzpP14MaTvk-uhbRnPrPSJE5sqxlj0RYPcpk3/s640/DSC_0007.jpg&quot; width=&quot;428&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
博物馆外面的围栏。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
由于约好了要下午五点左右到我住的地方check in，我等他们看完之后也离开了。我住的地方是一户台湾人开的“民宿”，也就是我们说的家庭旅馆。在伦敦的话这样住相对要便宜一些，48英镑一个晚上。房东是台湾人，漂洋过海嫁给了这边的一个英国人，两口子一起开了这样一家民宿，环境还算不错。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
晚上去附近一家叫做four seasons的中餐馆吃晚饭，自己一个人花了17英镑，一份香酥鸭和一份炒菜心，很不错。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
第三天（九月八号）：今天我自己一个人去大名鼎鼎的巨石阵（stonehenge）。这是人类史前时期的作品，有着5000年的历史。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS8v12Rl83uSnaj5swt-daNIZlVnSh7BCQwLvcIz1VX_XMI95t4-EHBj61STsyRK3TLcP3OOVxC4fO_cnDTssmPrdLsHxh5_JGR5x2eV26zfH4LbOeDNDJuz7QrFa1RKnIAPVa5eh31Xjx/s1600/DSC_0027.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS8v12Rl83uSnaj5swt-daNIZlVnSh7BCQwLvcIz1VX_XMI95t4-EHBj61STsyRK3TLcP3OOVxC4fO_cnDTssmPrdLsHxh5_JGR5x2eV26zfH4LbOeDNDJuz7QrFa1RKnIAPVa5eh31Xjx/s640/DSC_0027.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
这可不是windows的自带桌面壁纸哦！能亲眼目睹人类五千年前的杰作，这种感觉真的非常震撼。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih1ut_Zfp3XAErSfrLdRD5geLEtWFS3Nj6dORujEZU6DrTnqOl8EvCjBscPMzgGl-mxmeEwJ9E_zZqnIUO83wNU-2_NHDD9V11ic36WkxPRygc4XqNruwa_K8u46m8US2aAPRX2CB1wCgL/s1600/DSC_0065.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih1ut_Zfp3XAErSfrLdRD5geLEtWFS3Nj6dORujEZU6DrTnqOl8EvCjBscPMzgGl-mxmeEwJ9E_zZqnIUO83wNU-2_NHDD9V11ic36WkxPRygc4XqNruwa_K8u46m8US2aAPRX2CB1wCgL/s640/DSC_0065.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
巨石阵坐落在一片广袤的草原上，成群的羊在悠闲的吃草：）&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
观赏完巨石阵，我在Salisbury这个地方逗留了一会儿。Salisbury也是英国的一个古镇，注意这个单词里的“i”是不发音的哦，所以它读/s o l s b e r i/。这个小镇也有很漂亮的教堂，错落有致的街道给人一种不一样的美感，还有一个在英国当地挺有名气的市场（marketplace），很像中国的集市那种感觉。这些都是完全在美国看不到的哦。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgabskBoTIBJxK0znnIt0UwkYeaKo22MQFCQ6ri7bQQXuUMehlJfl1TkVRMslrUBHnCWLVszk1ZvV9CYueyHEnyfWyP4_ESIP9_1ok0UOU13aR1B2H8HIPQwDQD2g3lj77C9Rfi1-HUgncv/s1600/DSC_0023.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgabskBoTIBJxK0znnIt0UwkYeaKo22MQFCQ6ri7bQQXuUMehlJfl1TkVRMslrUBHnCWLVszk1ZvV9CYueyHEnyfWyP4_ESIP9_1ok0UOU13aR1B2H8HIPQwDQD2g3lj77C9Rfi1-HUgncv/s640/DSC_0023.jpg&quot; width=&quot;428&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
市中心的钟楼。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
这一天的晚餐是在Salisbury的中餐馆吃的，15英镑的自助餐，做的只能说是一般吧，没有特别出彩的菜。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
第四天（九月九号）：这是我在伦敦的最后一天啦。这一天上午去了大英博物馆，中午约了本科旧友X同学见面，下午在伦敦最繁华的商业街Oxford Street逛商场。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
大英博物馆真是非常赞的一个地方，你可以看到世界各国的稀世珍宝，并且不由地感慨大英帝国曾经是多么地强大，从各个不同地国家搜刮了如此之多精华。由于时间有限，我只观赏了埃及馆、希腊馆和中国馆。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiscE-EMRsJ2YF2GLtrxYerENPH5LeD9lOHdovWZp7kqV9XJL-55JhHjgs3lywGQSxGuODea4LOT_f_pF86CdwBxhc5rEzrgfYol8AFKe5-PzYAIcxt3URbW2a8nDmwz9Fyr6xmXu6MGdl6/s1600/DSC_0085.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiscE-EMRsJ2YF2GLtrxYerENPH5LeD9lOHdovWZp7kqV9XJL-55JhHjgs3lywGQSxGuODea4LOT_f_pF86CdwBxhc5rEzrgfYol8AFKe5-PzYAIcxt3URbW2a8nDmwz9Fyr6xmXu6MGdl6/s640/DSC_0085.jpg&quot; width=&quot;428&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
曾经历史课本上地插图，你熟悉吗？&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZHbg3nqANId3Z1dUqx0J10b9Rx_ljI0Z45IJoZYM8-cwRau77UYOqetHGBZVrrUTWiFSGMbyQXhSE25SldkJI1t-cml3k-QHjHg96BcLmB8ZRjB_itrjqH-_8oRs5IiKtpKzIbN5SmBhh/s1600/DSC_0112.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZHbg3nqANId3Z1dUqx0J10b9Rx_ljI0Z45IJoZYM8-cwRau77UYOqetHGBZVrrUTWiFSGMbyQXhSE25SldkJI1t-cml3k-QHjHg96BcLmB8ZRjB_itrjqH-_8oRs5IiKtpKzIbN5SmBhh/s640/DSC_0112.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
埃及馆内收藏着很多木乃伊（mummy）。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjIRijzeKq8E3zaGfmmumK1XrqHmPQaZvDke7vW7YhKAr1LS2rnzS6Qs54g8Z8bfBM5-MuIcwBC21CubXwiHxKNY_P1im0vrTDpo4J1ALm0GNj-WNtcKe_48AqPENfXSTtuDOJ9y1cbqai/s1600/DSC_0119.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjIRijzeKq8E3zaGfmmumK1XrqHmPQaZvDke7vW7YhKAr1LS2rnzS6Qs54g8Z8bfBM5-MuIcwBC21CubXwiHxKNY_P1im0vrTDpo4J1ALm0GNj-WNtcKe_48AqPENfXSTtuDOJ9y1cbqai/s640/DSC_0119.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
神秘地水晶骷髅：）&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
四天地旅程终于结束了。九月十号一大早我就赶往了希思罗机场，9个小时以后落地美国底特律，当地时间下午四点到达印第安纳波利斯。Back to school life！下一站是哪里？应该会是欧洲大陆啦！&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
九月十二号&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
于美国印第安纳&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/4679730219739589921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/4679730219739589921' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/4679730219739589921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/4679730219739589921'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/09/blog-post.html' title='九月英伦行'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG2tfHfv7Wc-IeLzAaJaG88qh7XckHBIbdKt2UrJTuqhX9bek2_Fv46KnZUmzvS-apOqhN0OVN0wYmHMy1jjp9oGLcYHq51UPJV8Z0YFrU80S4XYXR60nMTx_egaPMlkMf_aLSN9U9odtx/s72-c/DSC_0028.JPG" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>（大不列颠）联合王国伦敦</georss:featurename><georss:point>51.5081289 -0.128005</georss:point><georss:box>51.350006900000004 -0.443862 51.6662509 0.187852</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-1610773537951978204</id><published>2012-08-05T23:44:00.002-04:00</published><updated>2012-08-05T23:44:39.085-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Miscellaneous - 杂七杂八"/><title type='text'>【zz】IT行业降级论，看完醍醐灌顶啊</title><content type='html'>发信人: byrskiff (落寞城丶盼雨声丶等永恒), 信区: Entrepreneurship
标  题: 【zz】IT行业降级论，看完醍醐灌顶啊
发信站: 北邮人论坛 (Fri Jul 20 23:22:14 2012), 站内
  
几乎一年没有写博客了，说没时间那是借口，唯一的原因是，年纪越大越发觉自己肤浅。有些想法还没提笔，就发现很幼稚，就不敢发出来贻笑大方了。这次先给大家说个小故事：
  
从前有三个屌丝，聚在一起做网络，提供免费的网络服务，砸锅卖铁，通宵达旦，除了卖肾啥都做了。3年后终于做到了五百万用户，对于年轻人来说，能把五百万人玩弄于鼓掌之间，已经是很牛逼轰轰的事了，不过用户越多，成本越高，每年服务器、带宽租金、房租水电、广告运营等成本，已经达到了十七八万，屌丝们不得不面对一个终极问题：如何盈利？
  
屌丝们定了三盘沙县水饺，围着一箱子的冰啤酒开始计算：按照最近一月的登陆情况来看，四百万个账号已经不活跃了，真正有商业价值的只有一百万人，如 果开通xx功能，收点高级会员费，让其中1%的人升级为高级会员，每年付30块钱年费，那么每年收入就是100万x1%x30元=30万元！不错嘛， 扣除十七八万的运营成本，还剩毛利润12万，每个屌丝年底能分到4万大洋，如果按照打工者的算法，这三个人每人月薪3333元，木有奖金，木有津贴、木有任何福利，上班还得带自家的电脑。
  
尽管如此，屌丝们还是激动得咬了一口水饺：感谢苍天！我们终于要盈利啦！那一夜，人们看到三个发疯的屌丝在屋顶翩翩起舞。
  
韩寒说，中国人民是最有忍耐力的族群，一点好处就感激涕零。他一定不知道，IT创业界里的屌丝，才是这群傻逼中的战斗机。他们可以平静地忍受每年都持续亏钱，而且还能信心十足的对所有人说公司的状态非常好，如果有一天居然收支平衡了，他们会激动的趁夜难眠，比北朝鲜倒掉还开心。
  
本文开头的三个屌丝，其实是非常幸运的，至少能做到月薪3333元。大部分的屌丝在第一年做到几万用户的时候就会挂掉，原因众多，最主要要的是意志太弱，受不了最初的寂寞；意志稍微坚强点的会在第二年第三年慢慢挂掉，原因主要是资金断裂、团队分裂；能成功熬到第四年还没饿死、还没被口水淹死、还没被肠胃病颈椎病腰肌劳损折磨死的，甚至员工不减反增的，基本上属于神仙级别了。
  
我为什么要说三个屌丝的故事呢。首先是因为这是身边每天都在发生的故事，其次是因为感到可惜，IT界在我眼里一直是一个无比高级的职业，聚集着全球最聪明、最富有的人类精英。以IT创业界的青年们的智商，他们可以做成任何一件事情，包括改造银行到制造汽车到发射航天飞机 。结果这帮人却整天在蓬头垢面得为3k的月薪而挣扎，太悲催了。
  
为什么用悲催这个词？ 如果一个人生下来就在山沟沟里，一辈子都没机会去见什么好东西，这不叫悲催，这只叫苦难；而如果一个人生出来有一个奇怪的特异功能：皮肤出来的汗水会凝结成昂贵的水晶，本来只靠出汗就能赚钱，结果这傻逼居然觉得出汗这个行为太低级，做手术把自己的汗腺全给切了，而且丝毫没有意识到他做了什么傻事，这才叫真的悲催。
  
我们IT界中的很多人，生下来就是有这个出汗成水晶的特异功能的，正是因为这种与众不同，这群人能混入牛逼的大学，整天打网游还能写出像样的毕业论文， 拿到学位，进外企，考CPA，做咨询、做证券分析，研究高分子材料，做电子商务，做云计算……一级一级的上升，直到有一天，发现身边的人里，已经没有一个不是CPA，不是咨询师，不是高级研究员了，身边的人全是业界精英，个个都超级强悍。在这个所谓的高级圈子里，自己并没有任何过人之处，只不过是just another analyst而已。在高级圈子里拼的头破血流，最后也只能混到给台湾人整理数据而已。莫然回首，发现当年的血气方刚、年少时的无限梦想，进化成了一身肥胖的赘肉。这个时候，有个旁观者说：“升级到头了，该降级了”
  
当一个社会疯狂鼓吹快节奏的时候，一定需要有人来宣扬慢生活；当全社会跟打了鸡血似的吹捧升级的时候，一定需要有人来说说降级论。
  
IT青年们喜欢打游戏，喜欢升级。他们的人生也和游戏一样，沉醉于不停的升级中，不仅喜欢升级自己手上的技术，把MySql改成MongoDB，把 Apache升级为Nginx，在Mac上装Ubuntu，Ubuntu里再装个虚拟机去跑Mac OS……IT青年们也喜欢升级自己的人生，从程序员升级到项目经理，再升级到技术总监或产品总监，再升级到合伙人……
  
在不断追求升级的过程中，所面临的一个很大事实是：当一个人从A刚升级到A+级的时候，其实这个人的能力层级依然只是A的层级，还未胜任A+的层级，他必须要到A+的后期，才可以胜任A+。就好像一个高中生，高考完之后，虽然理论上已经属于大学生了，但是他的实际能力依然只是高三毕业的水平，除非他全部 pass了大一的期末考试。同样的道理，这个世界上有很多人的身份和称谓，都是在描述“未来的自己”，而不是现在的自己。当你从销售员升级为销售经理的时候，你自我感觉很好：“我现在是销售经理了”，但是这个时候 ，你并未通过公司对你作为销售经理这一年的工作成果的考核，你只是一个“未来可能是合格的销售经理”的前身。如果年终考核你失败了，那么这一年最准确的描述是：一个销售员，占了整整一年销售经理的位子，最后失败了。而且这一年一定会过的很累，因为通过考核的其他销售经理，才是真正胜任这个层级的人，跟一帮真正属于这个圈子的人厮杀，就好像拳击馆里当陪练的小角色，去和泰森比了一年的武，怎么可能不累呢？
  
当我07年进入互联网行业的时候，就是那个拳击馆里陪练的小角色，我被迫去跟全国各地的泰森比拼，结果累的半死。后来我开始反思最初的目标，为什么要在自己身上挂一个“拳击高手”的招牌，被那么多泰森追着打？ 我把这块招牌卸了，找个完全没练武的人去比拼，不是更容易赢么？于是果断照做，去找了一个没人懂拳击的小乡村，做了纯英文的Tucia.com(需翻墙)，只做国外的业务。在那个地方，作为一个知名武馆的拳击小陪练，我成了村子里拳击技术最高超的人，受人仰慕，还开武馆教人拳击，活的非常滋润，而且在教人拳击的过程中，自己的拳术也比以前提高了很多，发展出一套属于自己的拳法，我虽然进不了泰森们的大圈子，但他们也进不了我的小圈子。
  
关于圈子，有一个很赤裸裸的现实：不会是你进入圈子，只能是圈子进入你。很多人会四处找关系，“帮我介绍给xxx吧，我想进入你们的圈子”，这样的人是永远进不去这个圈子的，因为圈子的天性是，永远追求更高一个层级的人。而我们的大部分人，其实都在以低一级的属性，占着更高一级的位子，徘徊在更高一级的圈子边缘，与更高一级的人竞争，幻想着自己可以升级到那个圈子里去。也许永远进不去，悲催的努力一辈子；也许运气好，某一天真的进入这个圈子了，但那个时候又会有下一个目标，希望进入更高级的圈子，这是一场没有终点的战斗。永远的追求升级，永远的累。
  
有没有想过降级呢？
  
如果一个来自微软的高级工程师，辞职去一个养猪场做开放平台经理，那么他的到来不仅会让养猪圈感到无比荣幸，更是意味着，利用他在IT界训练出来的高效工作方式和逻辑思维能力，他可以掀起一场养猪行业的革命，使得20年后才会出现的人性、高效、开放、协作、健康的养殖方式提前到达。在这场革命中，他会活的非常有价值。这种价值，在原先的圈子里，是完全体验不到的，因为他此前的所有工作，只是在满身疮痍的windows系统上不停的打补丁，无论打多少都逃不开产品衰落、被人鄙视的命运。
  
很多人的命运，都像是上面那个微软工程师。只需要降级，就能创造更大的价值，也能获得更大的满足。那为什么不呢？为什么要死死抱着那个所谓的“高级职业”不放呢？
  
去年我曾犯贱去趟了移动互联网的浑水，做了个手机app，刚开始的时候感觉很高级，但很快，铺天盖地的竞争对手就出现了，我又发现自己陷入了07年一样的场景：作为一个小小陪练，我他妈的又被一帮泰森们给围住了。当泰森中的战斗机—微信，变得无比牛逼之后，我就知道，战胜这群泰森是绝对不可能的事情了。于是我再次投靠了“降级论”，把自己从牛逼哄哄的移动互联网行业，降级到了一个被人不齿的低级项目：Tucia Baby。
  
这个项目虽然是传统行业，但是我们基本上是按照互联网产品的思路去做的，除了拍摄需要来店里以外，其他一切，包括营销、预约、客服、后期、选片、取片、客户关系等，所有环节都放在网络上，尤其是微博（@tuciababy官网）。当然，最重要的是，作为一个脑残的果粉，我按照iPhone的做工品质去要求每一张作品，必须达到我们能力可以做到的最好水准，不计成本的最好水准，才允许送给客户。正式接客不到两个月时间，虽然还不敢自称成功，但目前已做到几乎每天都客满，口碑很好，财务上已实现盈利，未来相信一定会比大部分app开发者更光明。（ps:我们没有请工商、税务、城管去吃饭喝酒泡桑拿，也没有塞钱给任何政府机关。当你的产品真的用心做到很好的时候，其实你不需要讨好任何人的。）
  
这个项目让我沉思了很久：07年我曾把一个纯纯的web2.0网站做到了alexa中国区前1000名（如有质疑，请查询2010年附近的 tucia.com排名），结果一路亏损，到最后只剩下一个员工；11年我把那个纯纯的app做到苹果官方推荐区免费榜的第一位（如有质疑，请看点此看截图），那段时间每天四五千iPhone安装量，结果一路烧钱，到最后濒临关闭；而如今，我只需把自己从纯纯的互联网降级下来，做一些看起来有些“低级”的项目，居然就能立即实现收支平衡。
  
除此以外，我还发现一个现象，中国消费者在与奸商们的长期斗争中，已经培养出了一种非常苦B的品质：只要不被坑，他就谢天谢地。如果商家严格做到了承诺的每一件事情，客户就会感动的泪如泉涌。如果商家不仅做到了所有承诺的事情，还很贴心的提供了一些额外的服务（比如我们给每位客户赠送非常好吃的樱桃和昂贵的进口巧克力作为点心），那么客户就会激动的哭天喊地、奔走相告，推荐给他认识的每一个人。
  
其实这片肮脏的国土，就是上天赐予IT青年们的最好机会。
  
在一个不会练武的村子里，只要你会打两拳，你就是拳术最厉害的人；在一个没有服务意识、忽视产品质量的土地上，只要你用心做服务，用最高的标准去要求自己，你就会成为这块土地上最出色的商家；在一个没有现代管理意识，不懂网络、不懂微博、不懂用户体验、不懂口碑传播的粗犷社会里，你只需要把之前花在IT 产品上的心思的10%拿过来用，就可以秒杀一切天朝对手。
  
所以，
  
IT青年们，当你在为网站的转化率苦苦思索的时候，当你在为app的活跃度辗转反侧的时候，当你在为融资计划苦苦哀求各界大佬引荐的时候，也许犯了一个错误，也许你们的脑子最值得闪光的地方，不是去悲催的IT界当炮灰，而应该是去按摩界、餐饮界、烧烤界、早餐界、理发界、送花界、纺织界、装修界、婚庆葬仪界、成人用品界、现代养殖界、有机蔬果界、个人护理界、汽车修理界……与IT界相比，这些行业的确无比低级，他们的老板连qq都会发音成“抠抠”，他们的员工一辈子都没用过Email；跟他们解释什么是SEO，什么是用户体验，什么是数据挖掘，他们会在听你说完之前就开枪自杀掉。正是因为如此，这些行业才是如此的不堪一击。正是因为如此，当智商高达147的IT青年还在为3k薪水拼命、而智商不到50的烧烤店老板正坐在porsche里玩着前面那位青年开发的app的时候，我就忍不住仰望星空。
  
这些原始而纯粹的行业，正在等待IT精英们的降级，如同蒲公英一般的伞兵，在黑夜里从天而降，长驱直入，用最智慧的产品、最优质的服务拯救这些早就该死的行业，屌丝的生命将会绽放出银色的羽翼，无比丰满，无比性感。</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/1610773537951978204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/1610773537951978204' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/1610773537951978204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/1610773537951978204'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/08/zzit.html' title='【zz】IT行业降级论，看完醍醐灌顶啊'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-2769746033427005367</id><published>2012-05-21T20:17:00.000-04:00</published><updated>2012-05-21T20:46:08.700-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Technical - 技术水民"/><title type='text'>OpenCV+VS2010 linker error</title><content type='html'>1. OpenCV 2.4 linker error with VS2010
Problem:

    I have set up :

    Added
    &quot;C:\OpenCV2.3\include;C:\OpenCV2.3\include\opencv;C:\OpenCV2.3\include\opencv2;&quot;
    to Include Dir

    Added &quot;C:\OpenCV2.3\lib;&quot; to Libraries Directories

    And Added
    &quot;opencv_core230d.lib;opencv_highgui230d.lib;opencv_video230d.lib;opencv_ml230d.l\
    ib;opencv_legacy230d.lib;opencv_imgproc230d.lib;&quot; to Additional Dependencies For
    Input under Linker

    However, when I debug, I got Linker errors

Solution:


    change
    build-&gt;configuration manager-&gt;platform

    from win32 to x64

2. dll files not found

Solution:

    just add the path to dll files into the working directory (inside project properties)</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/2769746033427005367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/2769746033427005367' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/2769746033427005367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/2769746033427005367'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/05/opencvvs2010-linker-error.html' title='OpenCV+VS2010 linker error'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-2633756348198330713</id><published>2012-04-03T14:45:00.000-04:00</published><updated>2012-04-03T14:46:13.090-04:00</updated><title type='text'>[ZZ] A martingale solution to gambler’s ruin</title><content type='html'>讲的很清楚，直接上Link ==&lt;br /&gt;http://randomdeterminism.wordpress.com/2010/07/09/gamblers-ruin-2/</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/2633756348198330713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/2633756348198330713' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/2633756348198330713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/2633756348198330713'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2012/04/zz-martingale-solution-to-gamblers-ruin.html' title='[ZZ] A martingale solution to gambler’s ruin'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5816115664456228578.post-7020911077010170467</id><published>2011-07-19T20:35:00.000-04:00</published><updated>2011-07-19T20:36:27.525-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Doodle - 乱涂鸦"/><category scheme="http://www.blogger.com/atom/ns#" term="Miscellaneous - 杂七杂八"/><title type='text'>zz别向这个操蛋的世界投降</title><content type='html'>发信人: taoluan (乱~~~), 信区: Feeling&lt;br /&gt;标  题: zz别向这个操蛋的世界投降&lt;br /&gt;发信站:  北邮人论坛 (Tue Jul 19 22:05:31 2011), 站内&lt;br /&gt; &lt;br /&gt; 我妈常常喜欢念叨：人家又不喜欢你，你干嘛还要去喜欢人家。以前我一直想不出什么话反驳，只好简单粗暴地回应：一边去，你一老娘儿们你懂什么你。 &lt;br /&gt; &lt;br /&gt;        我 见过很多人，换男女朋友比换内裤还勤快的那种自不必说，还有像我们宿舍的闷骚青年，追女生，人家不睬他，他郁闷一阵子，提枪掉马就直奔下一目标而去了。我 在旁边看的目瞪口呆。你要问他，他保准振振有词：人家又不屌我，我喜欢她有什么用。是的，有什么用。然后还会反过头来劝我：没用的，我跟你说……这仿佛是 如此的天经地义，如此的不证自明。 &lt;br /&gt; &lt;br /&gt;        昨天，我仔细地想了想，终于想通了这个问题。其中的关键就在于，你究竟是喜欢 一个人本身，还是喜欢一种预期，一种前景，喜欢一种未来对方有可能和你上床睡觉结婚生子的可能性？ &lt;br /&gt; &lt;br /&gt;        这个年龄很多 人都急吼吼地寻找另一半抱团取暖。要我说，其中有多少是真的喜欢对方本身，这很难说。我这么说可能一来打击面太广，二来没有调查取证，所以显得不那么令人 信服。其实这很好判断，那就是扪心自问：换一个人行不行？ &lt;br /&gt; &lt;br /&gt;        这样多少有点神经质。对大多数人来说，并不存在一个绝 对不可替代的the  one。否则的话，这个世界会麻烦许多。小的时候，小到我才第一次思考爱情这回事的时候，我就对一个问题百思不得其解：你喜欢一个人，而这个人在茫茫人海 中又恰巧喜欢你，这是多么大的一个巧合啊！而幼小的我放眼望去，这个世界上充斥着不可胜数的一对对巧合。 &lt;br /&gt; &lt;br /&gt;        要解释 这样一件事，只能说明，在大多数人眼里，另一半绝不是不可替代的。而每一个个体的特质，很大程度上是相异的。换句话说，要追溯这种可替代性的载体，那可能 就是每个个体作为伴侣所能为对方提供的“服务”了。&lt;br /&gt; &lt;br /&gt;        比如说，深夜陪你聊天，闲暇陪你娱乐，工作学习相互鼓励，人情 冷暖相互慰藉，生理需要相互解决。然后买房结婚，构筑家庭，生儿育女，传宗接代。老了之后相互扶持，终了一生。这些都只是些伴侣给你带来的效用而已。这个 过程中，肯定会产生感情，不过这个感情的基础来自于这些过程当中一点一滴的积累，而不是来自于对方本身。换句话说，换一个人，你照样可以和他她积累起深厚 的感情。而关键就看谁最开始和你开启这段旅程。 &lt;br /&gt; &lt;br /&gt;          所以，少不更事的时候，我们总以为只有某个特定的对象才能给我们带来这一切，只有他们才能给我们幸福感。而后长大了我们知道并不是这么回事。“好女人多的 是的，何必呢。”我无数次地听见这句话。这就是所谓的成熟吧。 &lt;br /&gt; &lt;br /&gt;        这一切，也很美好。但这不是我想象中的爱情。 &lt;br /&gt; &lt;br /&gt;        就 像我那个倔强的困惑，如果不存在将就凑合的心理考量，如果每个人都是固执的完美主义者，那么怎么可能你喜欢的人也正好喜欢你呢？但是，一旦喜欢，那便是雷 打不动的定格。爱情所投射的对象本身基本不会产生多少重大的变化，除非她人品突变，性格突变，样貌突变，而这一切绝对是小概率事件。爱情对象在那，那么爱 情本身便随之恒定。她不喜欢我，那么我也就不喜欢她了，这作何道理？我喜欢的是她这个人，而不是“她可能喜欢我”“我们可以像情侣一样生活”这种期 盼。 &lt;br /&gt; &lt;br /&gt;        所以真正着眼于对象本身的爱情——我不敢说这是真正的爱情，但这是我理解的爱情——是这样的：她不认识我， 我会喜欢她；我们点头相交，我会喜欢她；她拒绝我，我会喜欢她；她反复拒绝我，我还是喜欢她；她不回我信，不听我电话，不回我短信，我还是喜欢她；她和别 的男人谈恋爱，我还是喜欢她；他和别的男人上床，我还是喜欢她；她和别的男人结婚，我还是喜欢她；她死了，我还是喜欢她。 &lt;br /&gt; &lt;br /&gt;        因 为我喜欢的是她本人，她本人不变，感情就不会也没有理由变。这一切都不会随着她对我的态度，她自身的选择而变化。 &lt;br /&gt; &lt;br /&gt;        但 是，这有什么用呢？ &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;       “我想学哲学，我想学艺术。”“学这些有什么用呢，能当饭吃吗？” &lt;br /&gt; &lt;br /&gt;        “我就是喜欢她”“她又不喜欢你，有什么用呢？” &lt;br /&gt; &lt;br /&gt;        “这个社会为什么这么不公平？”“这个社会就这样，你说这些又有什么用呢？” &lt;br /&gt; &lt;br /&gt;   &lt;br /&gt;        是的，有什么用 呢。我们每当面临内心的召唤的时候，这个问句都会鬼魅般如影随形。有时甚至不用父母亲友耳提面命，我们自己就习惯性地自问自责：有什么用呢？有什么用 呢？ &lt;br /&gt; &lt;br /&gt;        那要是追问到底，我们生于世间，百年来往，又有什么用呢？ &lt;br /&gt; &lt;br /&gt;        如果生 命是有意义的，那么我们内心的召唤就是有意义的。午夜梦回想到她时那满心酸楚难言的悸动，铺开信纸秉笔夜书时那字斟句酌的计较，经年再见面对佳人时那喷薄 欲出的情意，这一切都是爱情原本的意义所在，这一切都是生命本身赋予的。 &lt;br /&gt; &lt;br /&gt;        这有什么用？这本身就是最大的意 义。 &lt;br /&gt; &lt;br /&gt;        我们年轻时那些美丽的梦，它们往往敌不过这坚硬的世界，我们要将就，我们要放弃，我们要隐忍。比如爱情，谁 年少时没有些洁白的向往。但我们敌不过现实的无奈，父母的唠叨，亲朋的压力，甚至敌不过我们自己本身内心的虚弱和不耐烦。然后我们就将其掩埋，扭头它寻， 只有等到回首前尘时才泪满衣襟。 &lt;br /&gt; &lt;br /&gt;          我知道，很多人笑我幼稚。就连身边很好的朋友也常常对我说：“我保证，XX年之后你就不这样想了。”当然了，他们一再看着我过了XX年，还是一如既往地这 么幼稚。这算幼稚吗？我只是觉得大家的理解不同罢了。 &lt;br /&gt; &lt;br /&gt;        当然，我并不是说我不会放弃。就像我08年在《等死你》当 中写的：“也许有一天我会放弃，但是我绝不会像那些自以为看透了的人那样，等到将来自己的儿孙后辈面临这种类似的境遇的时候，傻逼哄哄地嘲讽他们，说一些 “别犯傻了，爱情这东西，就是……”之类的屁话。我会对他说，儿子，老爸当年也等过，但是老爸比较没种，没有坚持到底，就向这个急躁的世界缴械投降了。希 望你比老爸有出息。去吧，坚持你自己的内心，老爸支持你。” &lt;br /&gt; &lt;br /&gt;        是的，虽然自知终须一败，但请再多坚持一会，别向这 个操蛋的世界投降。 &lt;br /&gt; &lt;br /&gt;       来源：网络     作者：陈轩</content><link rel='replies' type='application/atom+xml' href='http://dklospace.blogspot.com/feeds/7020911077010170467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5816115664456228578/7020911077010170467' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/7020911077010170467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5816115664456228578/posts/default/7020911077010170467'/><link rel='alternate' type='text/html' href='http://dklospace.blogspot.com/2011/07/zz.html' title='zz别向这个操蛋的世界投降'/><author><name>Kun Duan (Colin)</name><uri>http://www.blogger.com/profile/06750227274843496948</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxZ5SfhBuNwEI4d122d_D7skku_V9UBF_g8NPwuBS0uDyViHKsjfyZPa_0HPCYNWIs_LI00H57wqmDLCWTosVoay7oZP_nB8Atg9O0WiE4OhEtJ6EQnzUBYbmkfLaMNuM/s220/kduan.jpg'/></author><thr:total>0</thr:total></entry></feed>