<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feed.feedsky.com/styles/feedsky1.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" version="2.0"><channel><atom:link href="http://feed.feedsky.com/leewings" type="application/rss+xml" ref="self"></atom:link><fs:self_link href="http://feed.feedsky.com/leewings" type="application/rss+xml"></fs:self_link><lastBuildDate>Thu, 03 Jul 2008 11:52:21 GMT</lastBuildDate><title>一劍淩雲御風行</title><description>IT and My live ---- Just for Fly and Fun^_^</description><link>http://leewings.cn</link><atom:link href="http://leewings.cn/?feed=rss2" rel="self" type="application/rss+xml"></atom:link><language>en</language><pubDate>Thu, 03 Jul 2008 11:52:21 GMT</pubDate><dc:date>2008-07-03T11:52:21Z</dc:date><dc:language>en</dc:language><item><title>7.4-7.8,GDOI2008</title><link>http://item.feedsky.com/~feedsky/leewings/~7002136/89800725/5110114/1/item.html</link><content:encoded>&lt;p style=&quot;text-align: center;&quot;&gt;明天去珠海了..!!呼呼.~&lt;br /&gt;
for GDOI2008..&lt;/p&gt;
&lt;p&gt;P.S.:昨天要交政治作业&amp;#8230;.没交.今天刘总(政治老师)问限令我明天下午前交&amp;#8230;.&lt;br /&gt;
课后,跟他说明天要去比赛一个星期,&lt;br /&gt;
刘总say:噢噢,好好比赛吧,这个没事,特殊情况,没事的.&lt;/p&gt;
&lt;p&gt;KO.&lt;br /&gt;
刘总真棒~!!&lt;br /&gt;
爽~^^&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;GDOI2008,&lt;br /&gt;
目标:前30.冲击!!&lt;/p&gt;

	标签：&lt;a href=&quot;http://leewings.cn/tag/fly/&quot; title=&quot;FLY&quot; rel=&quot;tag&quot;&gt;FLY&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/gdoi/&quot; title=&quot;GDOI&quot; rel=&quot;tag&quot;&gt;GDOI&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/oi/&quot; title=&quot;OI&quot; rel=&quot;tag&quot;&gt;OI&lt;/a&gt;&lt;br /&gt;

	&lt;h4&gt;相关日志&lt;/h4&gt;
	&lt;ul class=&quot;st-related-posts&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/is-time-to-be-busy.html&quot; title=&quot;要忙了&amp;#8220; (2008-06-13)&quot;&gt;要忙了&amp;#8220;&lt;/a&gt; (2)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/half-month-after-going-to-school.html&quot; title=&quot;开学半月 (2008-03-02)&quot;&gt;开学半月&lt;/a&gt; (9)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/laptop-in-school-temp.html&quot; title=&quot;带到学校的本本(离题万里篇) (2008-05-08)&quot;&gt;带到学校的本本(离题万里篇)&lt;/a&gt; (2)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/shopping-report.html&quot; title=&quot;《购物问题》解题报告 (2008-06-17)&quot;&gt;《购物问题》解题报告&lt;/a&gt; (3)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/triangle-report.html&quot; title=&quot;《直角三角形计数问题》解题报告 (2008-06-14)&quot;&gt;《直角三角形计数问题》解题报告&lt;/a&gt; (3)&lt;/li&gt;
&lt;/ul&gt;</content:encoded><wfw:commentRss>http://leewings.cn/74-78-gdoi2008.html/feed/</wfw:commentRss><description>明天去珠海了..!!呼呼.~
for GDOI2008..
P.S.:昨天要交政治作业&amp;#8230;.没交.今天刘总(政治老师)问限令我明天下午前交&amp;#8230;.
课后,跟他说明天要去比赛一个星期,
刘总say:噢噢,好好比赛吧,这个没事,特...</description><category>FLY</category><category>OI</category><category>GDOI</category><category>OI之路</category><pubDate>Thu, 03 Jul 2008 19:52:21 +0800</pubDate><author>Leewings</author><comments>http://leewings.cn/74-78-gdoi2008.html#comments</comments><guid isPermaLink="false">http://leewings.cn/?p=84</guid><dc:creator>Leewings</dc:creator><fs:srclink>http://leewings.cn/74-78-gdoi2008.html</fs:srclink><fs:srcfeed>http://leewings.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/leewings/~7002136/89800725/5110114</fs:itemid></item><item><title>EVA QQ 字体完美设置</title><link>http://item.feedsky.com/~feedsky/leewings/~7002136/89383959/5110114/1/item.html</link><content:encoded>&lt;p&gt;好久没写关于ubuntu的文章了&amp;#8230;.&lt;br /&gt;
EVA字体设置,&lt;a href=&quot;http://leewings.cn/ubuntu-used-diary-1.html&quot; target=&quot;_blank&quot;&gt;以前&lt;/a&gt;说过,不过,方法不是很完美..仅能修改一部分的字体..&lt;br /&gt;
在逛鲜果的时候,在   &lt;a href=&quot;http://www.ownlinux.cn/&quot; target=&quot;_blank&quot;&gt;OwnLinux.cn&lt;/a&gt;上看到这篇文章,很强大,故转之.&lt;br /&gt;
以下内容皆转载,其中的&amp;#8221;我&amp;#8221;指原作者&amp;#8230;.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;EVA 是目前LINUX中功能最强大的聊QQ的工具了。笔者的系统是Ubuntu 8.04 Gnome界面，用上Linux才半年，在网上找了很多篇改EVAQQ字体的文章，都没有一篇能够全面都修改字体，一般都只能修改部分字体，于是自己去 摸索一下吧～呵呵，结果花了几个小时终于给我找到我认为比较完美的设置。如果你觉得好，欢迎你给我鲜花或顶帖，你的支持是我最大的回报，不喜欢的话请留意 见给我，我会尽力去修改。废话不说，先上图吧～&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://www.ownlinux.cn/wp-content/uploads/2008/07/20080627_f7ade09aa19ae8c37adc5nhh5mqwzkzf-300x232.jpg&quot; alt=&quot;&quot; width=&quot;300&quot; height=&quot;232&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://www.ownlinux.cn/wp-content/uploads/2008/07/20080627_7716e61d30a6a6eb2e4c22sjjqccv4mt-300x267.jpg&quot; alt=&quot;&quot; width=&quot;300&quot; height=&quot;267&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://www.ownlinux.cn/wp-content/uploads/2008/07/20080627_033e3253ae5068065585po6mmd2jgink-300x268.jpg&quot; alt=&quot;&quot; width=&quot;300&quot; height=&quot;268&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://www.ownlinux.cn/wp-content/uploads/2008/07/20080627_23ca179d55a320eb1a98f0y4wfsmxglo-300x272.jpg&quot; alt=&quot;&quot; width=&quot;300&quot; height=&quot;272&quot; /&gt;&lt;br /&gt;
配置方法:&lt;br /&gt;
&lt;coolcode linenum=&quot;off&quot; lang=&quot;php&quot;&gt;gedit ~/.kde/share/config/kdeglobals&lt;/coolcode&gt;&lt;/p&gt;
&lt;p&gt;&lt;coolcode linenum=&quot;off&quot; lang=&quot;php&quot;&gt;[$Version]&lt;/p&gt;
&lt;p&gt;update_info=kded.upd:kde3.0&lt;/p&gt;
&lt;p&gt;[General]&lt;/p&gt;
&lt;p&gt;StandardFont=tahoma,11,-1,5,50,0,0,0,0,0&lt;/p&gt;
&lt;p&gt;XftHintStyle=hintfull&lt;/p&gt;
&lt;p&gt;activeFont=tahoma,11,-1,5,75,0,0,0,0,0&lt;/p&gt;
&lt;p&gt;fixed=DejaVu Sans Mono,9,-1,5,50,0,0,0,0,0&lt;/p&gt;
&lt;p&gt;font=微软雅黑,9,-1,5,50,0,0,0,0,0&lt;/p&gt;
&lt;p&gt;menuFont=微软雅黑,9,-1,5,50,0,0,0,0,0&lt;/p&gt;
&lt;p&gt;taskbarFont=微软雅黑,9,-1,5,50,0,0,0,0,0&lt;/p&gt;
&lt;p&gt;toolBarFont=微软雅黑,9,-1,5,50,0,0,0,0,0&lt;/p&gt;
&lt;p&gt;[KFileDialog Settings]&lt;/p&gt;
&lt;p&gt;Automatically select filename extension=true&lt;/p&gt;
&lt;p&gt;Height 1024=288&lt;/p&gt;
&lt;p&gt;LocationCombo Completionmode=5&lt;/p&gt;
&lt;p&gt;PathCombo Completionmode=5&lt;/p&gt;
&lt;p&gt;Recent URLs[$e]=$HOME/.eva/187205/customCaches/,$HOME/图片/&lt;/p&gt;
&lt;p&gt;Separate Directories=false&lt;/p&gt;
&lt;p&gt;Show Bookmarks=false&lt;/p&gt;
&lt;p&gt;Show Preview=false&lt;/p&gt;
&lt;p&gt;Show Speedbar=true&lt;/p&gt;
&lt;p&gt;Show hidden files=false&lt;/p&gt;
&lt;p&gt;Sort by=Name&lt;/p&gt;
&lt;p&gt;Sort case insensitively=true&lt;/p&gt;
&lt;p&gt;Sort directories first=true&lt;/p&gt;
&lt;p&gt;Sort reversed=false&lt;/p&gt;
&lt;p&gt;View Style=Simple&lt;/p&gt;
&lt;p&gt;Width 1280=634&lt;/p&gt;
&lt;p&gt;[Paths]&lt;/p&gt;
&lt;p&gt;Trash[$e]=$HOME/桌面/Trash/&lt;/p&gt;
&lt;p&gt;[WM]&lt;/p&gt;
&lt;p&gt;activeFont=微软雅黑,9,-1,5,50,0,0,0,0,0&lt;/coolcode&gt;&lt;/p&gt;
&lt;p&gt;这是本人自己摸索出来的设置，欢迎转载，但转载时请注明作者，谢谢！&lt;/p&gt;
&lt;p&gt;作者：&lt;strong&gt;&lt;span style=&quot;color: #0080ff;&quot;&gt;Jason@月影&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;

	标签：&lt;a href=&quot;http://leewings.cn/tag/eva/&quot; title=&quot;EVA&quot; rel=&quot;tag&quot;&gt;EVA&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/im/&quot; title=&quot;IM&quot; rel=&quot;tag&quot;&gt;IM&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/linux/&quot; title=&quot;linux&quot; rel=&quot;tag&quot;&gt;linux&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/qq/&quot; title=&quot;QQ&quot; rel=&quot;tag&quot;&gt;QQ&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/%e8%b4%b4%e5%9b%be/&quot; title=&quot;贴图&quot; rel=&quot;tag&quot;&gt;贴图&lt;/a&gt;&lt;br /&gt;

	&lt;h4&gt;相关日志&lt;/h4&gt;
	&lt;ul class=&quot;st-related-posts&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/pidgin-2-4-0.html&quot; title=&quot;Pidgin 2.4.0 (2008-03-02)&quot;&gt;Pidgin 2.4.0&lt;/a&gt; (11)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/touch-hiweed.html&quot; title=&quot;接触Hiweed (2008-03-01)&quot;&gt;接触Hiweed&lt;/a&gt; (1)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/powerful-kvm.html&quot; title=&quot;强悍的KVM! (2008-05-31)&quot;&gt;强悍的KVM!&lt;/a&gt; (7)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/opensource-2.html&quot; title=&quot;《开源》No.2 (2008-03-07)&quot;&gt;《开源》No.2&lt;/a&gt; (2)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/opensource.html&quot; title=&quot;《开源》&amp;#8212;-中文杂志for开源世界 (2008-03-07)&quot;&gt;《开源》&amp;#8212;-中文杂志for开源世界&lt;/a&gt; (2)&lt;/li&gt;
&lt;/ul&gt;</content:encoded><wfw:commentRss>http://leewings.cn/eva-qq-fonts.html/feed/</wfw:commentRss><description>好久没写关于ubuntu的文章了&amp;#8230;.
EVA字体设置,以前说过,不过,方法不是很完美..仅能修改一部分的字体..
在逛鲜果的时候,在   OwnLinux.cn上看到这篇文章,很强大,故转之.
以下内容皆转载,其中的&amp;#82...</description><category>linux</category><category>IM</category><category>EVA</category><category>QQ</category><category>精彩推荐</category><category>贴图</category><pubDate>Wed, 02 Jul 2008 10:37:23 +0800</pubDate><author>Leewings</author><comments>http://leewings.cn/eva-qq-fonts.html#comments</comments><guid isPermaLink="false">http://leewings.cn/?p=83</guid><dc:creator>Leewings</dc:creator><fs:srclink>http://leewings.cn/eva-qq-fonts.html</fs:srclink><fs:srcfeed>http://leewings.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/leewings/~7002136/89383959/5110114</fs:itemid></item><item><title>Pirates Of Silicon Valley</title><link>http://item.feedsky.com/~feedsky/leewings/~7002136/88636137/5110114/1/item.html</link><content:encoded>&lt;p&gt;&lt;a href=&quot;http://www.douban.com/subject/1298084/&quot;&gt;&lt;img style=&quot;float:left;padding:0 20px 20px 0;&quot; src=&quot;http://otho.douban.com/mpic/s1447032.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
中文名:硅谷海盗.&lt;br /&gt;
故事说的是Apple和Microsoft的起步和恩怨,一群年轻人的奋斗史&amp;#8230;.&lt;br /&gt;
记得有译为&amp;lt;微软英雄&amp;gt;的..看了之后,觉得,是个错误的翻译吧.&lt;br /&gt;
这部片是以Jobs为主轴的,英雄是Jobs&amp;#8230;而Gates..第二主角吧,看似是奸雄..&lt;br /&gt;
片中有句他们两人都奉承的话,很强大:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;优秀的艺术家复制别人的作品,伟大的艺术家偷窃别人的作品.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;不过,有趣的是,Jobs认为是毕加索说的,而Gates认为是凡高说的&amp;#8230;.呵呵.&lt;br /&gt;
很喜欢他们那个时代,奋斗的时代.&lt;br /&gt;
未来的一年半,属于我的时代已经来临!&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;span class=&quot;content&quot;&gt;给自己定下了一个空前宏大的目标,为期1年半.!我要拼尽所有!&lt;/span&gt; &lt;span class=&quot;stamp&quot;&gt;&lt;a class=&quot;time&quot; title=&quot;2008-06-28 22:29&quot; href=&quot;http://fanfou.com/statuses/AcTg5Ok9itI&quot;&gt;2008-06-28 22:29&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;span class=&quot;content&quot;&gt;证明..&lt;/span&gt; &lt;span class=&quot;stamp&quot;&gt;&lt;a class=&quot;time&quot; title=&quot;2008-06-29 10:52&quot; href=&quot;http://fanfou.com/statuses/fe0PkNSsoGw&quot;&gt;2008-06-29 10:52&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;object classid=&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot; width=&quot;401&quot; height=&quot;334&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot;&gt;&lt;param name=&quot;align&quot; value=&quot;middle&quot; /&gt;&lt;param name=&quot;src&quot; value=&quot;http://player.youku.com/player.php/sid/XMzA3NzQ2ODQ=/v.swf&quot; /&gt;&lt;embed type=&quot;application/x-shockwave-flash&quot; width=&quot;401&quot; height=&quot;334&quot; src=&quot;http://player.youku.com/player.php/sid/XMzA3NzQ2ODQ=/v.swf&quot; align=&quot;middle&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;

	标签：&lt;a href=&quot;http://leewings.cn/tag/apple/&quot; title=&quot;Apple&quot; rel=&quot;tag&quot;&gt;Apple&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/fly/&quot; title=&quot;FLY&quot; rel=&quot;tag&quot;&gt;FLY&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/it/&quot; title=&quot;IT&quot; rel=&quot;tag&quot;&gt;IT&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/microsoft/&quot; title=&quot;Microsoft&quot; rel=&quot;tag&quot;&gt;Microsoft&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/%e5%bd%b1%e9%9f%b3/&quot; title=&quot;影音&quot; rel=&quot;tag&quot;&gt;影音&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/%e8%b4%b4%e5%9b%be/&quot; title=&quot;贴图&quot; rel=&quot;tag&quot;&gt;贴图&lt;/a&gt;&lt;br /&gt;

	&lt;h4&gt;相关日志&lt;/h4&gt;
	&lt;ul class=&quot;st-related-posts&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/time-after-time.html&quot; title=&quot;Time After Time～花舞う街で～ (2008-05-17)&quot;&gt;Time After Time～花舞う街で～&lt;/a&gt; (9)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/will.html&quot; title=&quot;￠`愿 ,^ (2008-04-19)&quot;&gt;￠`愿 ,^&lt;/a&gt; (9)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/sad-for-the-sear-of-cherry-blossom.html&quot; title=&quot;樱花伤逝 (2008-02-23)&quot;&gt;樱花伤逝&lt;/a&gt; (1)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/dream-laptop.html&quot; title=&quot;梦,我的&amp;#8217;本本~ (2008-05-02)&quot;&gt;梦,我的&amp;#8217;本本~&lt;/a&gt; (11)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/new-theme.html&quot; title=&quot;新主题 (2008-05-04)&quot;&gt;新主题&lt;/a&gt; (5)&lt;/li&gt;
&lt;/ul&gt;</content:encoded><wfw:commentRss>http://leewings.cn/pirates-of-silicon-valley.html/feed/</wfw:commentRss><description>中文名:硅谷海盗.
故事说的是Apple和Microsoft的起步和恩怨,一群年轻人的奋斗史&amp;#8230;.
记得有译为&amp;#60;微软英雄&amp;#62;的..看了之后,觉得,是个错误的翻译吧.
这部片是以Jobs为主轴的,英雄是Jobs&amp;#8230;...</description><category>Microsoft</category><category>FLY</category><category>影音</category><category>Apple</category><category>IT</category><category>精彩推荐</category><category>贴图</category><pubDate>Sun, 29 Jun 2008 17:59:18 +0800</pubDate><author>Leewings</author><comments>http://leewings.cn/pirates-of-silicon-valley.html#comments</comments><guid isPermaLink="false">http://leewings.cn/?p=82</guid><dc:creator>Leewings</dc:creator><fs:srclink>http://leewings.cn/pirates-of-silicon-valley.html</fs:srclink><fs:srcfeed>http://leewings.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/leewings/~7002136/88636137/5110114</fs:itemid></item><item><title>姐姐·高考</title><link>http://item.feedsky.com/~feedsky/leewings/~7002136/88156498/5110114/1/item.html</link><content:encoded>&lt;blockquote&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;广东文科重本线570.&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;姐姐568.&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;不甘.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;不喜欢高考.&lt;/p&gt;
&lt;/blockquote&gt;

	标签：&lt;a href=&quot;http://leewings.cn/tag/fly/&quot; title=&quot;FLY&quot; rel=&quot;tag&quot;&gt;FLY&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/%e5%a7%90%e5%a7%90/&quot; title=&quot;姐姐&quot; rel=&quot;tag&quot;&gt;姐姐&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/%e9%ab%98%e8%80%83/&quot; title=&quot;高考&quot; rel=&quot;tag&quot;&gt;高考&lt;/a&gt;&lt;br /&gt;

	&lt;h4&gt;相关日志&lt;/h4&gt;
	&lt;ul class=&quot;st-related-posts&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/will.html&quot; title=&quot;￠`愿 ,^ (2008-04-19)&quot;&gt;￠`愿 ,^&lt;/a&gt; (9)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/huancheng.html&quot; title=&quot;读《幻城》有感 (2008-05-16)&quot;&gt;读《幻城》有感&lt;/a&gt; (8)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/is-time-to-be-busy.html&quot; title=&quot;要忙了&amp;#8220; (2008-06-13)&quot;&gt;要忙了&amp;#8220;&lt;/a&gt; (2)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/sad-for-the-sear-of-cherry-blossom.html&quot; title=&quot;樱花伤逝 (2008-02-23)&quot;&gt;樱花伤逝&lt;/a&gt; (1)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/dream-laptop.html&quot; title=&quot;梦,我的&amp;#8217;本本~ (2008-05-02)&quot;&gt;梦,我的&amp;#8217;本本~&lt;/a&gt; (11)&lt;/li&gt;
&lt;/ul&gt;</content:encoded><wfw:commentRss>http://leewings.cn/sister-gk.html/feed/</wfw:commentRss><description>广东文科重本线570.
姐姐568.
不甘.


不喜欢高考.


	标签：FLY, 姐姐, 高考

	相关日志
	
	￠`愿 ,^ (9)
	读《幻城》有感 (8)
	要忙了&amp;#8220; (2)
	樱花伤逝 (1)
	梦,我的&amp;#8217;本本~ (11)

...</description><category>FLY</category><category>高考</category><category>姐姐</category><pubDate>Fri, 27 Jun 2008 19:10:50 +0800</pubDate><author>Leewings</author><comments>http://leewings.cn/sister-gk.html#comments</comments><guid isPermaLink="false">http://leewings.cn/?p=81</guid><dc:creator>Leewings</dc:creator><fs:srclink>http://leewings.cn/sister-gk.html</fs:srclink><fs:srcfeed>http://leewings.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/leewings/~7002136/88156498/5110114</fs:itemid></item><item><title>KVM有可视化软件啦—-oVirt</title><link>http://item.feedsky.com/~feedsky/leewings/~7002136/88156499/5110114/1/item.html</link><content:encoded>&lt;p&gt;刚搜到的消息:KVM有可视化软件啦!!&lt;br /&gt;
Red Hat 在本周发布了一个新的虚拟化平台──&lt;a href=&quot;http://ovirt.org/&quot; target=&quot;_blank&quot;&gt;oVirt&lt;/a&gt;!基于&lt;a href=&quot;http://kvm.qumranet.com/&quot; target=&quot;_blank&quot;&gt;KVM&lt;/a&gt;的哦^^&lt;br /&gt;
来看下界面先~&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://ovirt.org/styles/front-graphic.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;挺好看的吧..嘿嘿.&lt;br /&gt;
来看下&lt;a href=&quot;http://ovirt.org/&quot; target=&quot;_blank&quot;&gt;官网&lt;/a&gt;对其的介绍吧:&lt;/p&gt;
&lt;blockquote&gt;
&lt;h3&gt;oVirt is:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;A small host image that provides &lt;strong&gt;&lt;a href=&quot;http://libvirt.org/&quot;&gt;libvirt&lt;/a&gt;&lt;/strong&gt; and hosts virtual machines&lt;/li&gt;
&lt;li&gt;A Web-based virtual machine management console&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;oVirt goals:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Empower virtual machine owners without giving up control of hardware&lt;/li&gt;
&lt;li&gt;Automate virtual machine clustering, load balancing, and SLA maintenance&lt;/li&gt;
&lt;li&gt;Simplify management of large numbers of machines&lt;/li&gt;
&lt;li&gt;Work across platforms and architectures&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;oVirt uses:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;A kerberos/LDAP server for authentication and authorization (&lt;strong&gt;oVirt&lt;/strong&gt; ships with &lt;strong&gt;&lt;a href=&quot;http://freeipa.org/&quot;&gt;FreeIPA&lt;/a&gt;&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;DNS/DHCP services on the local LAN &amp;#8212; or provides them for &lt;strong&gt;oVirt&lt;/strong&gt; hosts over a private network if desired&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://libvirt.org/&quot;&gt;libvirt&lt;/a&gt;&lt;/strong&gt; for virtual machine management, storage management, and secure remote communication&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://collectd.org/&quot;&gt;collectd&lt;/a&gt;&lt;/strong&gt; for stats gathering and monitoring&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://www.rubyonrails.org/&quot;&gt;Rails&lt;/a&gt;&lt;/strong&gt; for rapid, flexible development&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;目前的版本是oVirt 0.91-1 beta ,可以在&lt;a href=&quot;http://ovirt.org/download.html&quot; target=&quot;_blank&quot;&gt;这里&lt;/a&gt;下载~~&lt;/p&gt;

	标签：&lt;a href=&quot;http://leewings.cn/tag/kvm/&quot; title=&quot;KVM&quot; rel=&quot;tag&quot;&gt;KVM&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/linux/&quot; title=&quot;linux&quot; rel=&quot;tag&quot;&gt;linux&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/%e8%99%9a%e6%8b%9f%e6%9c%ba/&quot; title=&quot;虚拟机&quot; rel=&quot;tag&quot;&gt;虚拟机&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/%e8%b4%b4%e5%9b%be/&quot; title=&quot;贴图&quot; rel=&quot;tag&quot;&gt;贴图&lt;/a&gt;&lt;br /&gt;

	&lt;h4&gt;相关日志&lt;/h4&gt;
	&lt;ul class=&quot;st-related-posts&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/powerful-kvm.html&quot; title=&quot;强悍的KVM! (2008-05-31)&quot;&gt;强悍的KVM!&lt;/a&gt; (7)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/ubuntu-used-diary-3.html&quot; title=&quot;Ubuntu使用日志（3）&amp;#8212;- vbox与rdesktop (2008-02-10)&quot;&gt;Ubuntu使用日志（3）&amp;#8212;- vbox与rdesktop&lt;/a&gt; (18)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/touch-hiweed.html&quot; title=&quot;接触Hiweed (2008-03-01)&quot;&gt;接触Hiweed&lt;/a&gt; (1)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/use-vmware-workstation-to-virual-xp.html&quot; title=&quot;使用VMware Workstation虚拟XP (2008-05-25)&quot;&gt;使用VMware Workstation虚拟XP&lt;/a&gt; (8)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/opensource-2.html&quot; title=&quot;《开源》No.2 (2008-03-07)&quot;&gt;《开源》No.2&lt;/a&gt; (2)&lt;/li&gt;
&lt;/ul&gt;</content:encoded><wfw:commentRss>http://leewings.cn/ovirt-for-kvm.html/feed/</wfw:commentRss><description>刚搜到的消息:KVM有可视化软件啦!!
Red Hat 在本周发布了一个新的虚拟化平台──oVirt!基于KVM的哦^^
来看下界面先~

挺好看的吧..嘿嘿.
来看下官网对其的介绍吧:

oVirt is:

A small host image that provides...</description><category>KVM</category><category>linux</category><category>软件分享</category><category>虚拟机</category><category>贴图</category><pubDate>Sat, 21 Jun 2008 11:15:28 +0800</pubDate><author>Leewings</author><comments>http://leewings.cn/ovirt-for-kvm.html#comments</comments><guid isPermaLink="false">http://leewings.cn/?p=80</guid><dc:creator>Leewings</dc:creator><fs:srclink>http://leewings.cn/ovirt-for-kvm.html</fs:srclink><fs:srcfeed>http://leewings.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/leewings/~7002136/88156499/5110114</fs:itemid></item><item><title>WAITing but GOing On</title><link>http://item.feedsky.com/~feedsky/leewings/~7002136/88156500/5110114/1/item.html</link><content:encoded>&lt;blockquote&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;一份心事的湮灭,如释重负.&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;一个心愿的默诺,动力无穷.&lt;/p&gt;
&lt;p style=&quot;text-align: right;&quot;&gt;6.17&lt;/p&gt;
&lt;/blockquote&gt;

	标签：&lt;a href=&quot;http://leewings.cn/tag/cherry/&quot; title=&quot;Cherry&quot; rel=&quot;tag&quot;&gt;Cherry&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/fly/&quot; title=&quot;FLY&quot; rel=&quot;tag&quot;&gt;FLY&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/oi/&quot; title=&quot;OI&quot; rel=&quot;tag&quot;&gt;OI&lt;/a&gt;&lt;br /&gt;

	&lt;h4&gt;相关日志&lt;/h4&gt;
	&lt;ul class=&quot;st-related-posts&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/half-month-after-going-to-school.html&quot; title=&quot;开学半月 (2008-03-02)&quot;&gt;开学半月&lt;/a&gt; (9)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/is-time-to-be-busy.html&quot; title=&quot;要忙了&amp;#8220; (2008-06-13)&quot;&gt;要忙了&amp;#8220;&lt;/a&gt; (2)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/laptop-in-school-temp.html&quot; title=&quot;带到学校的本本(离题万里篇) (2008-05-08)&quot;&gt;带到学校的本本(离题万里篇)&lt;/a&gt; (2)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/is-or-not.html&quot; title=&quot;似是若非 (2008-03-08)&quot;&gt;似是若非&lt;/a&gt; (9)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/charity-sale-heart.html&quot; title=&quot;义卖,心. (2008-05-19)&quot;&gt;义卖,心.&lt;/a&gt; (10)&lt;/li&gt;
&lt;/ul&gt;</content:encoded><wfw:commentRss>http://leewings.cn/waiting-but-going-on.html/feed/</wfw:commentRss><description>一份心事的湮灭,如释重负.
一个心愿的默诺,动力无穷.
6.17


	标签：Cherry, FLY, OI

	相关日志
	
	开学半月 (9)
	要忙了&amp;#8220; (2)
	带到学校的本本(离题万里篇) (2)
	似是若非 (9)
	义卖,心. (10)

...</description><category>FLY</category><category>OI</category><category>Cherry</category><pubDate>Thu, 19 Jun 2008 08:11:26 +0800</pubDate><author>Leewings</author><comments>http://leewings.cn/waiting-but-going-on.html#comments</comments><guid isPermaLink="false">http://leewings.cn/?p=79</guid><dc:creator>Leewings</dc:creator><fs:srclink>http://leewings.cn/waiting-but-going-on.html</fs:srclink><fs:srcfeed>http://leewings.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/leewings/~7002136/88156500/5110114</fs:itemid></item><item><title>《购物问题》解题报告</title><link>http://item.feedsky.com/~feedsky/leewings/~7002136/88156501/5110114/1/item.html</link><content:encoded>&lt;ul&gt;
&lt;li&gt;
&lt;h2&gt;题目描述&lt;/h2&gt;
&lt;/li&gt;
&lt;blockquote&gt;&lt;p&gt;
GDOI商场(这题是弄GDOI的人出的….)…….(忽略故事性描述.~)&lt;/p&gt;
&lt;p&gt;有一堆商品,每种都能省到一定的钱,但每种只能买一件,而且有些是不能同时买的.不能同时买的商品中,不会出现一个环(即类似于”C1与C2不能同时买,C2与C3不能同时买,C3与C1不能同时买”这样的情况是不会出现的).&lt;/p&gt;
&lt;p&gt;编程求能节省的最大金额数.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;这回稍微说明下输入:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;输入中,第一行K(商品种数),M(不能同时买的对数).&lt;br /&gt;
接下来K行,第i行有一个整数表示购买编号i的商品可以节省的金额;再接下来M行,每行两个数,表示这两件商品不能同时购买.&lt;/p&gt;&lt;/blockquote&gt;
&lt;li&gt;
&lt;h2&gt;题目分析&lt;/h2&gt;
&lt;/li&gt;
&lt;p&gt;图啊图啊图….对于图知识约等于0的我来说..分析这题花了很多时间…..&lt;/p&gt;
&lt;p&gt;据说,这题的关键是构造一个结点带权的图,结点表示商品,结点的权就是购买该商品能节省的$$,边表示边所连的两个点的商品不能同时购买.这就相当于在这幅图中找出一系列的没有边相连的点,且权值之和最大~~&lt;br /&gt;
由于题目的最后一个条件,这张图里面是没有环滴..也就是,是树林吖….我们的目的就是算出每棵树的最大节省金额,然后求和.&lt;/p&gt;
&lt;p&gt;这题DP起来,状态方程倒不难得出,一颗颗树来做啦,请看~~&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;F[i]表示选择这个结点的最优值;G[i]表示不选择这个结点的最优值;S[i]表示这个结点原来的权值.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;对于叶子来说,F[i]=S[i],G[i]=0;&lt;/li&gt;
&lt;li&gt;对于非叶子,
&lt;ul&gt;
&lt;li&gt; F[i]=∑G[j] +S[i]&lt;/li&gt;
&lt;li&gt;G[i]=∑max(F[j],G[j])&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;    其中,j是i儿子~&lt;/li&gt;
&lt;li&gt;r为根,该树的结果就是max(F[r],G[r])啦^^&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;问题是….菜鸟的我不知道怎么构建树….看了例程,是C++写的,而且用了指针….好吧,看不懂.没办法…..还是硬着头皮自己想怎么去构建吧.&lt;/p&gt;
&lt;p&gt;想啊想,想啊想,想到啦!!&lt;br /&gt;
想到建立一个二维数组T[i,j,k],i表示层数,j表示这一层的老爸,k肯定就是这个老爸的儿子们啦.按照宽度优先的规则将结点存进去就是了….&lt;br /&gt;
不过,在实际编程的时候,运用了深搜来建造这颗树,结合上面说的思路,发现从最低层开始,访问每个结点,顺便计算….这样,就不用记录下这颗树了,也就不用开数组来存它啦^^&lt;br /&gt;
这个可能是最笨的方法吧?&amp;#8230;.&lt;/p&gt;
&lt;li&gt;
&lt;h2&gt;源代码&lt;/h2&gt;
&lt;/li&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;pascal&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;program&lt;/span&gt; shopping;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;type&lt;/span&gt; style=&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;record&lt;/span&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//突然发现,记录类型太好用了…&lt;/span&gt;
             F,G,S:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;longint&lt;/span&gt;; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//F:选择该结点的最优值;G:不选择该结点的最优值;S:该结点原来的权值.&lt;/span&gt;
             son:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;..&lt;span style=&quot;color: #cc66cc;&quot;&gt;1000&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;longint&lt;/span&gt;; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//该结点的儿子们~&lt;/span&gt;
             used:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;boolean&lt;/span&gt;; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//该结点是否被访问过&lt;/span&gt;
           &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
&amp;nbsp;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; thing:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;..&lt;span style=&quot;color: #cc66cc;&quot;&gt;1000&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;of&lt;/span&gt; style; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//商品&lt;/span&gt;
    k,m,i,temp,a,b,ans:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;longint&lt;/span&gt;; 
&amp;nbsp;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; max&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;a,b:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;longint&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;longint&lt;/span&gt;;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; a&amp;gt;b &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; max:=a &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;else&lt;/span&gt; max:=b;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
&amp;nbsp;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;procedure&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;l,f:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;longint&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//建造树,并顺便算最优值&lt;/span&gt;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; i:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;longint&lt;/span&gt;;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;used&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;or&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;son&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;=&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//如果该结点已被访问过或他没有儿子&lt;/span&gt;
    thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;F&lt;/span&gt;:=thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;S&lt;/span&gt;;
    thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;used&lt;/span&gt;:=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;true&lt;/span&gt;;
    exit;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
  thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;used&lt;/span&gt;:=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;true&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; i:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;son&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;l&lt;span style=&quot;color: #cc66cc;&quot;&gt;+1&lt;/span&gt;,thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;son&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//对每个儿子构造一次&lt;/span&gt;
  thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;F&lt;/span&gt;:=thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;S&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; i:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;son&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//顺便计算每个结点的最优值&lt;/span&gt;
    thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;F&lt;/span&gt;:=thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;F&lt;/span&gt;+thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;son&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;G&lt;/span&gt;; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//F[i]=∑G[j] +S[i]&lt;/span&gt;
    thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;G&lt;/span&gt;:=thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;G&lt;/span&gt;+max&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;son&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;F&lt;/span&gt;,thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;f&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;son&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;G&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//G[i]=∑max(F[j],G[j])&lt;/span&gt;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
&amp;nbsp;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  assign&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;input,&lt;span style=&quot;color: #ff0000;&quot;&gt;'shopping.in'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;assign&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;output,&lt;span style=&quot;color: #ff0000;&quot;&gt;'shopping.out'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  reset&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;input&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;rewrite&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;output&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  &lt;span style=&quot;color: #000066;&quot;&gt;readln&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;k,m&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  fillchar&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;thing,sizeof&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; i:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; k &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
    fillchar&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;son&lt;/span&gt;,sizeof&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;son&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
    &lt;span style=&quot;color: #000066;&quot;&gt;readln&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;S&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; i:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; m &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//帮老爸找到儿子&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;readln&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;a,b&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; a&amp;gt;b &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//为避免重复,不能同时购买的商品中,编号小的是老爸&lt;/span&gt;
      temp:=a;a:=b;b:=temp;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
    inc&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;a&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;son&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
    thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;a&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;son&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;a&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;son&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;:=b;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
&amp;nbsp;
  ans:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; i:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; k &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//枚举每棵树&lt;/span&gt;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;used&lt;/span&gt;=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
      &lt;span style=&quot;color: #000066;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;,i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//造树+计算最优值..&lt;/span&gt;
      ans:=ans+max&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;F&lt;/span&gt;,thing&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;G&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//累加最优值&lt;/span&gt;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
&amp;nbsp;
  &lt;span style=&quot;color: #000066;&quot;&gt;writeln&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;ans&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  close&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;input&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;close&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;output&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;.&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/ul&gt;

	标签：&lt;a href=&quot;http://leewings.cn/tag/gdoi/&quot; title=&quot;GDOI&quot; rel=&quot;tag&quot;&gt;GDOI&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/oi/&quot; title=&quot;OI&quot; rel=&quot;tag&quot;&gt;OI&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/pascal/&quot; title=&quot;pascal&quot; rel=&quot;tag&quot;&gt;pascal&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/programmer/&quot; title=&quot;programmer&quot; rel=&quot;tag&quot;&gt;programmer&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/%e4%bb%a3%e7%a0%81/&quot; title=&quot;代码&quot; rel=&quot;tag&quot;&gt;代码&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/%e8%a7%a3%e9%a2%98%e6%8a%a5%e5%91%8a/&quot; title=&quot;解题报告&quot; rel=&quot;tag&quot;&gt;解题报告&lt;/a&gt;&lt;br /&gt;

	&lt;h4&gt;相关日志&lt;/h4&gt;
	&lt;ul class=&quot;st-related-posts&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/triangle-report.html&quot; title=&quot;《直角三角形计数问题》解题报告 (2008-06-14)&quot;&gt;《直角三角形计数问题》解题报告&lt;/a&gt; (3)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/sheep-report.html&quot; title=&quot;《可怜的绵羊问题》解题报告 (2008-06-15)&quot;&gt;《可怜的绵羊问题》解题报告&lt;/a&gt; (0)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/group-report.html&quot; title=&quot;《分组游戏》解题报告 (2008-06-15)&quot;&gt;《分组游戏》解题报告&lt;/a&gt; (0)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/noip2007-game.html&quot; title=&quot;NOIP2007 矩阵取数游戏 解题报告 (2008-03-29)&quot;&gt;NOIP2007 矩阵取数游戏 解题报告&lt;/a&gt; (4)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/noip2006-junior.html&quot; title=&quot;NOIP2006普及组 解题报告 (2008-05-13)&quot;&gt;NOIP2006普及组 解题报告&lt;/a&gt; (2)&lt;/li&gt;
&lt;/ul&gt;</content:encoded><wfw:commentRss>http://leewings.cn/shopping-report.html/feed/</wfw:commentRss><description>题目描述


GDOI商场(这题是弄GDOI的人出的….)…….(忽略故事性描述.~)
有一堆商品,每种都能省到一定的钱,但每种只能买一件,而且有些是不能同时买的.不能同时买的商品中,不会出现一个环(即...</description><category>OI</category><category>GDOI</category><category>OI之路</category><category>代码</category><category>解题报告</category><category>programmer</category><category>pascal</category><pubDate>Tue, 17 Jun 2008 09:49:16 +0800</pubDate><author>Leewings</author><comments>http://leewings.cn/shopping-report.html#comments</comments><guid isPermaLink="false">http://leewings.cn/?p=78</guid><dc:creator>Leewings</dc:creator><fs:srclink>http://leewings.cn/shopping-report.html</fs:srclink><fs:srcfeed>http://leewings.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/leewings/~7002136/88156501/5110114</fs:itemid></item><item><title>《分组游戏》解题报告</title><link>http://item.feedsky.com/~feedsky/leewings/~7002136/88156502/5110114/1/item.html</link><content:encoded>&lt;ul&gt;
&lt;li&gt;
&lt;h2&gt;题目描述&lt;/h2&gt;
&lt;/li&gt;
&lt;blockquote&gt;&lt;p&gt;
有一群人,他们之中任意两个人的关系是认识或不认识(当然,也可能出现A认识B而B不认识A的情况),现在需要你按照一定的规则将他们分成两组,分组的规则如下:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;每个人属于其中的一组;&lt;/li&gt;
&lt;li&gt;每组至少有一个人;&lt;/li&gt;
&lt;li&gt;同一组种任何一个人都认识该组中的其他人;&lt;/li&gt;
&lt;li&gt;两组的人数要尽可能的接近&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;这个任务可能有多个解,你只需要输出其中任意一个或者输出无解信息.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;li&gt;
&lt;h2&gt;题目分析&lt;/h2&gt;
&lt;/li&gt;
&lt;p&gt;这题例程是用DP+集合的方法的,写了瞒长的….&lt;/p&gt;
&lt;p&gt;我是用什么方法我自己都不知道….只是,这个思路MS很棒(自恋下..).当然,基本思想还是有滴,是集合啦.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;读完数据,也就是每个人的关系后,创建两个集合A、B(不是真的集合类型,是两个数组….).A[0](B[0])记录集合元素的个数.&lt;/li&gt;
&lt;li&gt;然后把第一个人仍进集合A.&lt;/li&gt;
&lt;li&gt;接着按照以下规则依次把人扔进集合中:
&lt;ul&gt;
&lt;li&gt;若此人与A中任何一个人都认识,仍进A中;&lt;/li&gt;
&lt;li&gt;否则,若此人与B中任何一个人都认识,仍进B中;&lt;/li&gt;
&lt;li&gt;否则,输出无解,结束程序.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;这样就保证了两个集合中人员编号的有序(输出要求..),同时也可以及时判断无解.这样有一个问题,就是无法满足条件4:两组的人数要尽可能的接近.&lt;/p&gt;
&lt;p&gt;这个问题嘛,也不难.使A为人数多的集合,B为人数少的.每次从A中抽出B中任何一个人都认识的人插入到B中知道两个集合人数相等或不能再A中不能再向B插入任何人.&lt;/p&gt;
&lt;p&gt;KO.&lt;/p&gt;
&lt;li&gt;
&lt;h2&gt;源代码&lt;/h2&gt;
&lt;/li&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;pascal&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;program&lt;/span&gt; group;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;const&lt;/span&gt; mp&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;{maxpeople}&lt;/span&gt;=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1000&lt;/span&gt;;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; g1,g2,tg:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;..&lt;span style=&quot;color: #202020;&quot;&gt;mp&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;integer&lt;/span&gt;;
&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//g1=集合A,g2=集合B,处理条件4时的中间变量&lt;/span&gt;
    re&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;{relation}&lt;/span&gt;:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;..&lt;span style=&quot;color: #202020;&quot;&gt;mp&lt;/span&gt;,&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;..&lt;span style=&quot;color: #202020;&quot;&gt;mp&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;boolean&lt;/span&gt;;
    n,i,j,k,temp:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;integer&lt;/span&gt;;
    check,swap:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;boolean&lt;/span&gt;;
&amp;nbsp;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  assign&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;input,&lt;span style=&quot;color: #ff0000;&quot;&gt;'group.in'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;assign&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;output,&lt;span style=&quot;color: #ff0000;&quot;&gt;'group.out'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  reset&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;input&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;rewrite&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;output&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  &lt;span style=&quot;color: #000066;&quot;&gt;readln&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;n&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; n=&lt;span style=&quot;color: #cc66cc;&quot;&gt;2&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//如果是2个人….想都别想,理他3721,答案肯定是这样的..&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;writeln&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'1 1'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
    &lt;span style=&quot;color: #000066;&quot;&gt;writeln&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'1 2'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
    close&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;input&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;close&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;output&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
    halt;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
  fillchar&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;re,sizeof&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;re&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; i:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; n &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;read&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;while&lt;/span&gt; j&amp;lt;&amp;gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
      re&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i,j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;:=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;true&lt;/span&gt;;
      &lt;span style=&quot;color: #000066;&quot;&gt;read&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
    &lt;span style=&quot;color: #000066;&quot;&gt;readln&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
  fillchar&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;g1,sizeof&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  g2:=g1;
  g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;;g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//将第一个人仍进集合A&lt;/span&gt;
&amp;nbsp;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; i:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;2&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; n &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//依次将人扔进集合中&lt;/span&gt;
    check:=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; j:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt;
      &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;re&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i,g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;or&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;re&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;,i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
      &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//如果和A中某个人不认识&lt;/span&gt;
        check:=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt;;
        &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;break&lt;/span&gt;;
      &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; check &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
    &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//如果和A中任何一个人都认识,扔进集合A中&lt;/span&gt;
      inc&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
      g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;:=i;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
    &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//否则,判断下是否和B中的任何一个人都人之&lt;/span&gt;
      &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; j:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt;
        &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;re&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i,g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;or&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;re&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;,i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
        &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//惨了….和B中的某个人不认识.好吧,此题无解&lt;/span&gt;
          &lt;span style=&quot;color: #000066;&quot;&gt;writeln&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'No solution'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
          close&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;input&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;close&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;output&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
          halt;
        &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
      &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//都认识噢?扔进集合B中..&lt;/span&gt;
      inc&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
      g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;:=i;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
&amp;nbsp;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&amp;lt;g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//使A为人数多的集合,B为人数少的&lt;/span&gt;
    tg:=g1;g1:=g2;g2:=tg;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;=g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; swap:=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;else&lt;/span&gt; swap:=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;true&lt;/span&gt;;
  &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//如果两个集合人数相等,就不用再处理什么啦啦..&lt;/span&gt;
&amp;nbsp;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&amp;gt;g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;and&lt;/span&gt; swap &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//处理条件4&lt;/span&gt;
    temp:=g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; i:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//枚举A中的每个元素&lt;/span&gt;
      check:=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;true&lt;/span&gt;;
      &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; j:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt;
        &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;re&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;,g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;or&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;re&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;,g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
        &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//如果和B中某个人不认识,那就不能把他T出去了&lt;/span&gt;
          check:=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt;;
          &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;break&lt;/span&gt;;
        &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
        &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; check &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
        &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//如何条件,他被无情的T过去了&lt;/span&gt;
          &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; j:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt;
            &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&amp;lt;g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
            &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//保证有序,把他插进去..&lt;/span&gt;
              &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; k:=j &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt; g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;k&lt;span style=&quot;color: #cc66cc;&quot;&gt;+1&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;:=g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;k&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;;
              g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;:=g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;;
              inc&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
              &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;break&lt;/span&gt;;
            &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
          &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; k:=i &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt; g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;k&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;:=g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;k&lt;span style=&quot;color: #cc66cc;&quot;&gt;+1&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;;
          g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;k&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;;
          dec&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
          &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;break&lt;/span&gt;;
        &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
      &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;=temp &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; swap:=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt;;
    &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//说明集合A中没有任何人给T出去了,也就是不用再T人了…&lt;/span&gt;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
&amp;nbsp;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; i:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;-1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;write&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;,&lt;span style=&quot;color: #ff0000;&quot;&gt;' '&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  &lt;span style=&quot;color: #000066;&quot;&gt;writeln&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;g1&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; j:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;-1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;write&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;,&lt;span style=&quot;color: #ff0000;&quot;&gt;' '&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  &lt;span style=&quot;color: #000066;&quot;&gt;writeln&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;g2&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;;
  close&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;input&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;close&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;output&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;.&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/ul&gt;

	标签：&lt;a href=&quot;http://leewings.cn/tag/gdoi/&quot; title=&quot;GDOI&quot; rel=&quot;tag&quot;&gt;GDOI&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/oi/&quot; title=&quot;OI&quot; rel=&quot;tag&quot;&gt;OI&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/pascal/&quot; title=&quot;pascal&quot; rel=&quot;tag&quot;&gt;pascal&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/programmer/&quot; title=&quot;programmer&quot; rel=&quot;tag&quot;&gt;programmer&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/%e4%bb%a3%e7%a0%81/&quot; title=&quot;代码&quot; rel=&quot;tag&quot;&gt;代码&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/%e8%a7%a3%e9%a2%98%e6%8a%a5%e5%91%8a/&quot; title=&quot;解题报告&quot; rel=&quot;tag&quot;&gt;解题报告&lt;/a&gt;&lt;br /&gt;

	&lt;h4&gt;相关日志&lt;/h4&gt;
	&lt;ul class=&quot;st-related-posts&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/shopping-report.html&quot; title=&quot;《购物问题》解题报告 (2008-06-17)&quot;&gt;《购物问题》解题报告&lt;/a&gt; (3)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/triangle-report.html&quot; title=&quot;《直角三角形计数问题》解题报告 (2008-06-14)&quot;&gt;《直角三角形计数问题》解题报告&lt;/a&gt; (3)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/sheep-report.html&quot; title=&quot;《可怜的绵羊问题》解题报告 (2008-06-15)&quot;&gt;《可怜的绵羊问题》解题报告&lt;/a&gt; (0)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/noip2007-game.html&quot; title=&quot;NOIP2007 矩阵取数游戏 解题报告 (2008-03-29)&quot;&gt;NOIP2007 矩阵取数游戏 解题报告&lt;/a&gt; (4)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/noip2006-junior.html&quot; title=&quot;NOIP2006普及组 解题报告 (2008-05-13)&quot;&gt;NOIP2006普及组 解题报告&lt;/a&gt; (2)&lt;/li&gt;
&lt;/ul&gt;</content:encoded><wfw:commentRss>http://leewings.cn/group-report.html/feed/</wfw:commentRss><description>题目描述


有一群人,他们之中任意两个人的关系是认识或不认识(当然,也可能出现A认识B而B不认识A的情况),现在需要你按照一定的规则将他们分成两组,分组的规则如下:

每个人属于其中的一...</description><category>OI</category><category>GDOI</category><category>OI之路</category><category>代码</category><category>解题报告</category><category>programmer</category><category>pascal</category><pubDate>Sun, 15 Jun 2008 15:56:31 +0800</pubDate><author>Leewings</author><comments>http://leewings.cn/group-report.html#comments</comments><guid isPermaLink="false">http://leewings.cn/?p=77</guid><dc:creator>Leewings</dc:creator><fs:srclink>http://leewings.cn/group-report.html</fs:srclink><fs:srcfeed>http://leewings.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/leewings/~7002136/88156502/5110114</fs:itemid></item><item><title>《可怜的绵羊问题》解题报告</title><link>http://item.feedsky.com/~feedsky/leewings/~7002136/88156503/5110114/1/item.html</link><content:encoded>&lt;ul&gt;
&lt;li&gt;
&lt;h2&gt;题目描述&lt;/h2&gt;
&lt;/li&gt;
&lt;blockquote&gt;&lt;p&gt;
忽略无聊的故事性描述….直接写上这个问题的本质吧。实质上，这道题是这样的：&lt;/p&gt;
&lt;p&gt;按逆时针顺序给出n个点（类型A）的坐标，这些点顺次相连成一个凸多边形（该多边形只是形状是凸的，即某些点可能落在多边形边上）。还给出一些点（类型B）的坐标，这些点可能在平面任何一个地方，当然，不与类型A的点重合。&lt;/p&gt;
&lt;p&gt;你的任务是选出一些类型A的点围成一个新的凸多边形，并使它不包含类型B的点（类型B的点可以在边上）且面积尽可能的大。如果无法找到这样的多边形，则输出”die”;否则输出最大面积（保留两位小数）。
&lt;/p&gt;&lt;/blockquote&gt;
&lt;li&gt;
&lt;h2&gt;题目分析&lt;/h2&gt;
&lt;/li&gt;
&lt;p&gt;进一步浓缩题目可得出，本题的实质是在凸多边形内求一面积最大的新的凸多边形，且该多边形内无点。&lt;/p&gt;
&lt;p&gt;如果以点u为起点，可以找到一个最大凸n边形VuV1V2…Vn，这个多边形以点n为尾且n与u相连；则凸n＋1边形也必是以u为起点，n＋1为尾的最大凸多边形。由此可见，此题满足最优化原理，可用动态规划解决。&lt;/p&gt;
&lt;p&gt;如何划分状态呢？&lt;br /&gt;
我是将多边形划分成三角形的，从3个点开始，每次加一个点，即加一个三角形，原图形的面积加上新加三角形的面积即为此次的状态。&lt;/p&gt;
&lt;p&gt;综上便可得出状态转移方程：&lt;br /&gt;
&lt;coolcode lang=&quot;php&quot; linenum=&quot;off&quot;&gt;ms[u,j]=max{ms[u,i]+s(u,i,j)}(0&lt;u&lt;=n,u&lt;i&lt;j&lt;n+u-1);&lt;/coolcode&gt;&lt;br /&gt;
此方程中，u是枚举起点，i、j是往后的2个点(这两点不一定是连续的,因为某些点是不会成为新凸多边形的顶点的,要枚举忽略掉).&lt;/p&gt;
&lt;p&gt;但是,这样还不算完成.还有一个条件,新凸多边形中不包含类型B的点.这条的实现要有数学的基础了(好吧,我承认,我是G出来的公式…)….&lt;br /&gt;
首先,用下面这条公式来计算三角形的面积(其实我也不知道是怎么得到的..):&lt;br /&gt;
公式一:&lt;coolcode lang=&quot;php&quot; linenum=&quot;off&quot;&gt;&lt;br /&gt;
s=abs((x1*y2+x2*y3+x3*y1-x1*y3-x2*y1-x3*y2)/2)&lt;br /&gt;
&lt;/coolcode&gt;&lt;/p&gt;
&lt;p&gt;用下面这条公式来判断点是否在直线上,成立则在.(高中数学必修一的内容了.~)&lt;br /&gt;
公式二:&lt;coolcode lang=&quot;php&quot; linenum=&quot;off&quot;&gt;(x1-x)*(y2-y)=(x2-x)*(y1-y)&lt;/coolcode&gt;&lt;br /&gt;
判断点是否在三角形内的方法:&lt;br /&gt;
计算每条边和这个点组成的三个三角形的面积之和,若等于原三角形面积,则点在三角形上(用公式二排除掉)或三角形内;不等于则说明点在三角形外.&lt;br /&gt;
这样一来,就不难得出,最后的状态转移方程是这样的:&lt;br /&gt;
&lt;coolcode lang=&quot;php&quot; linenum=&quot;off&quot;&gt;ms[u,j]=max{&lt;br /&gt;
      s(u,i,j) //边上有类型B的点&lt;br /&gt;
      ms[i]+s(u,i,j) //边上无类型B的点&lt;br /&gt;
      }&lt;/coolcode&gt;&lt;br /&gt;
其中, 0 &lt; u &lt;= n, u &lt; i &lt; j &lt; n+u-1,三角形VuViVj内无类型B的点.&lt;/p&gt;
&lt;p&gt;说得不清楚?或许….你可以直接读源代码….&lt;/p&gt;
&lt;li&gt;
&lt;h2&gt;源代码&lt;/h2&gt;
&lt;/li&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;pascal&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;program&lt;/span&gt; sheep;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;type&lt;/span&gt; map=&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;record&lt;/span&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//记录点坐标的记录类型&lt;/span&gt;
     x,y:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;longint&lt;/span&gt;;
   &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
&amp;nbsp;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; p:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;..&lt;span style=&quot;color: #cc66cc;&quot;&gt;300&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;of&lt;/span&gt; map;
 &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//前100个为类型A的点;为了枚举起点需要,中间100个同前100个一摸一样;后100个为类型B的点&lt;/span&gt;
   n,m,i,j,u:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;longint&lt;/span&gt;;
   ms:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;..&lt;span style=&quot;color: #cc66cc;&quot;&gt;100&lt;/span&gt;,&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;..&lt;span style=&quot;color: #cc66cc;&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;real&lt;/span&gt;; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//保存状态&lt;/span&gt;
   ts:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;real&lt;/span&gt;;
&amp;nbsp;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; gets&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;a,b,c:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;longint&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;real&lt;/span&gt;;
&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//计算三角形面积&lt;/span&gt;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
gets:=&lt;span style=&quot;color: #000066;&quot;&gt;abs&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;a&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x*p&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;b&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;+p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;b&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x*p&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;c&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;+p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;c&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x*p&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;a&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;-p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;a&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x*p&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;c&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;-p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;b&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x*p&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;a&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;-p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;c&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x*p&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;b&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;/&lt;span style=&quot;color: #cc66cc;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
&amp;nbsp;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; checkside&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;a,b:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;longint&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;boolean&lt;/span&gt;; 
&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//检查边上是否有类型B的点,有则返回true;&lt;/span&gt;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; d:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;longint&lt;/span&gt;;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  checkside:=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; d:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;201&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; m&lt;span style=&quot;color: #cc66cc;&quot;&gt;+200&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;a&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x&lt;/span&gt;-p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;d&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;*&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;b&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;-p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;d&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;=&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;b&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x&lt;/span&gt;-p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;d&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;*&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;a&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;-p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;d&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
      checkside:=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;true&lt;/span&gt;;
      &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;break&lt;/span&gt;;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
&amp;nbsp;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; cside&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;a,b,d:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;longint&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;boolean&lt;/span&gt;;
&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//为方便在检查三角形边上是否有点而在上一个函数的基础上增加一个参数&lt;/span&gt;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  cside:=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;a&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x&lt;/span&gt;-p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;d&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;*&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;b&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;-p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;d&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;=&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;b&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x&lt;/span&gt;-p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;d&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;*&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;a&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;-p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;d&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; 
    cside:=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;true&lt;/span&gt;;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
&amp;nbsp;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; checkin&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;a,b,c:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;longint&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;boolean&lt;/span&gt;;
&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//检查三角形内是否有点,有则返回true&lt;/span&gt;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; d:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;longint&lt;/span&gt;;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  checkin:=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; d:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;201&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; m&lt;span style=&quot;color: #cc66cc;&quot;&gt;+200&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;gets&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;a,b,c&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;=gets&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;a,b,d&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;+gets&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;a,c,d&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;+gets&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;b,c,d&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;and&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;cside&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;a,b,d&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
      checkin:=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;true&lt;/span&gt;;
      &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;break&lt;/span&gt;;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
&amp;nbsp;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; max&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;a,b:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;real&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;real&lt;/span&gt;;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; a&amp;gt;b &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; max:=a &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;else&lt;/span&gt; max:=b;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
&amp;nbsp;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
  assign&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;input,&lt;span style=&quot;color: #ff0000;&quot;&gt;'sheep.in'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  assign&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;output,&lt;span style=&quot;color: #ff0000;&quot;&gt;'sheep.out'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  reset&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;input&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;rewrite&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;output&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  &lt;span style=&quot;color: #000066;&quot;&gt;readln&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;n&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; i:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; n &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;readln&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x&lt;/span&gt;,p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
    p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i+n&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x&lt;/span&gt;:=p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x&lt;/span&gt;;p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i+n&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;:=p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
  &lt;span style=&quot;color: #000066;&quot;&gt;readln&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;m&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; i:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; m &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;readln&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #cc66cc;&quot;&gt;+200&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;x&lt;/span&gt;,p&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #cc66cc;&quot;&gt;+200&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #202020;&quot;&gt;y&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  fillchar&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;ms,sizeof&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;ms&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
&amp;nbsp;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; u:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; n &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt;
  &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//枚举起点&lt;/span&gt;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; i:=u&lt;span style=&quot;color: #cc66cc;&quot;&gt;+1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; n+u&lt;span style=&quot;color: #cc66cc;&quot;&gt;-1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt;
    &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//枚举起点以后的另一个点&lt;/span&gt;
      &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; j:=i&lt;span style=&quot;color: #cc66cc;&quot;&gt;+1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; n+u&lt;span style=&quot;color: #cc66cc;&quot;&gt;-1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt;
      &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//枚举新增的点&lt;/span&gt;
        &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; checkin&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;u,i,j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;=&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;false&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;begin&lt;/span&gt;
        &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//如果三角形内无点,则可加入此三角形到多边形中&lt;/span&gt;
          ts:=gets&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;u,i,j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
          &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; checkside&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;u,j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; ms&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;u,j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;:=max&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;ms&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;u,j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;,ts&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;
          &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;else&lt;/span&gt; ms&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;u,j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;:=max&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;ms&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;u,j&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;,ms&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;u,i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;+ts&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
        &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;;
&amp;nbsp;
  ts:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;for&lt;/span&gt; u:=&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;to&lt;/span&gt; n &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;do&lt;/span&gt; 
  &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;//寻找枚举顶点得到的面积最大的多边形&lt;/span&gt;
    &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; ms&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;u,n+u&lt;span style=&quot;color: #cc66cc;&quot;&gt;-1&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&amp;gt;ts &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; ts:=ms&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;u,n+u&lt;span style=&quot;color: #cc66cc;&quot;&gt;-1&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt; ts=&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;then&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;writeln&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'die'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;writeln&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;ts:&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;:&lt;span style=&quot;color: #cc66cc;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
  close&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;input&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;close&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;output&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;end&lt;/span&gt;.&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/ul&gt;

	标签：&lt;a href=&quot;http://leewings.cn/tag/gdoi/&quot; title=&quot;GDOI&quot; rel=&quot;tag&quot;&gt;GDOI&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/oi/&quot; title=&quot;OI&quot; rel=&quot;tag&quot;&gt;OI&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/pascal/&quot; title=&quot;pascal&quot; rel=&quot;tag&quot;&gt;pascal&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/programmer/&quot; title=&quot;programmer&quot; rel=&quot;tag&quot;&gt;programmer&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/%e4%bb%a3%e7%a0%81/&quot; title=&quot;代码&quot; rel=&quot;tag&quot;&gt;代码&lt;/a&gt;, &lt;a href=&quot;http://leewings.cn/tag/%e8%a7%a3%e9%a2%98%e6%8a%a5%e5%91%8a/&quot; title=&quot;解题报告&quot; rel=&quot;tag&quot;&gt;解题报告&lt;/a&gt;&lt;br /&gt;

	&lt;h4&gt;相关日志&lt;/h4&gt;
	&lt;ul class=&quot;st-related-posts&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/shopping-report.html&quot; title=&quot;《购物问题》解题报告 (2008-06-17)&quot;&gt;《购物问题》解题报告&lt;/a&gt; (3)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/triangle-report.html&quot; title=&quot;《直角三角形计数问题》解题报告 (2008-06-14)&quot;&gt;《直角三角形计数问题》解题报告&lt;/a&gt; (3)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/group-report.html&quot; title=&quot;《分组游戏》解题报告 (2008-06-15)&quot;&gt;《分组游戏》解题报告&lt;/a&gt; (0)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/noip2007-game.html&quot; title=&quot;NOIP2007 矩阵取数游戏 解题报告 (2008-03-29)&quot;&gt;NOIP2007 矩阵取数游戏 解题报告&lt;/a&gt; (4)&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://leewings.cn/noip2006-junior.html&quot; title=&quot;NOIP2006普及组 解题报告 (2008-05-13)&quot;&gt;NOIP2006普及组 解题报告&lt;/a&gt; (2)&lt;/li&gt;
&lt;/ul&gt;</content:encoded><wfw:commentRss>http://leewings.cn/sheep-report.html/feed/</wfw:commentRss><description>题目描述


忽略无聊的故事性描述….直接写上这个问题的本质吧。实质上，这道题是这样的：
按逆时针顺序给出n个点（类型A）的坐标，这些点顺次相连成一个凸多边形（该多边形只是形状...</description><category>OI</category><category>GDOI</category><category>OI之路</category><category>代码</category><category>解题报告</category><category>programmer</category><category>pascal</category><pubDate>Sun, 15 Jun 2008 09:49:31 +0800</pubDate><author>Leewings</author><comments>http://leewings.cn/sheep-report.html#comments</comments><guid isPermaLink="false">http://leewings.cn/?p=76</guid><dc:creator>Leewings</dc:creator><fs:srclink>http://leewings.cn/sheep-report.html</fs:srclink><fs:srcfeed>http://leewings.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/leewings/~7002136/88156503/5110114</fs:itemid></item><item><title>Free Pascal Run-time errors</title><link>http://item.feedsky.com/~feedsky/leewings/~7002136/88156504/5110114/1/item.html</link><content:encoded>&lt;p&gt;每次都要去查&amp;#8230;.干脆直接从FP的help doc里面copy下来好了..~&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
Applications generated by Free Pascal might generate Run-time error when certain abnormal conditions&lt;br /&gt;
are detected in the application. This appendix lists the possible run-time errors and gives&lt;br /&gt;
information on why they might be produced.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;1 Invalid function number An invalid operating system call was attempted.&lt;/li&gt;
&lt;li&gt;2 File not found Reported when trying to erase, rename or open a non-existent file.&lt;/li&gt;
&lt;li&gt;3 Path not found Reported by the directory handling routines when a path does not exist or is invalid.&lt;br /&gt;
Also reported when trying to access a non-existent file.&lt;/li&gt;
&lt;li&gt;4 Too many open files The maximum number of currently opened files by your process has been&lt;br /&gt;
reached. Certain operating systems limit the number of files which can be opened concurrently,&lt;br /&gt;
and this error can occur when this limit has been reached.
&lt;/li&gt;
&lt;li&gt;5 File access denied Permission accessing the file is denied. This error might be caused by several&lt;br /&gt;
reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; Trying to open for writing a file which is read only, or which is actually a directory.&lt;/li&gt;
&lt;li&gt; File is currently locked or used by another process.&lt;/li&gt;
&lt;li&gt; Trying to create a new file, or directory while a file or directory of the same name already&lt;br /&gt;
exists.&lt;/li&gt;
&lt;li&gt; Trying to read from a file which was opened in write only mode.&lt;/li&gt;
&lt;li&gt; Trying to write from a file which was opened in read only mode.&lt;/li&gt;
&lt;li&gt; Trying to remove a directory or file while it is not possible.&lt;/li&gt;
&lt;li&gt; No permission to access the file or directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;6 Invalid file handle If this happens, the file variable you are using is trashed; it indicates that your&lt;br /&gt;
memory is corrupted.
&lt;/li&gt;
&lt;li&gt;12 Invalid file access code Reported when a reset or rewrite is called with an invalid FileMode&lt;br /&gt;
value.
&lt;/li&gt;
&lt;li&gt;15 Invalid drive number The number given to the Getdir or ChDir function specifies a nonexistent&lt;br /&gt;
disk.
&lt;/li&gt;
&lt;li&gt;16 Cannot remove current directory Reported when trying to remove the currently active directory.
&lt;/li&gt;
&lt;li&gt;17 Cannot rename across drives You cannot rename a file such that it would end up on another&lt;br /&gt;
disk or partition.
&lt;/li&gt;
&lt;li&gt;100 Disk read error An error occurred when reading from disk. Typically when you try to read past&lt;br /&gt;
the end of a file.
&lt;/li&gt;
&lt;li&gt;101 Disk write error Reported when the disk is full, and you&amp;#8217;re trying to write to it.
&lt;/li&gt;
&lt;li&gt;102 File not assigned This is reported by Reset, Rewrite, Append, Rename and Erase, if&lt;br /&gt;
you call them with an unassigned file as a parameter.
&lt;/li&gt;
&lt;li&gt;103 File not open Reported by the following functions : Close, Read, Write, Seek, EOf,&lt;br /&gt;
FilePos, FileSize, Flush, BlockRead, and BlockWrite if the file is not open.
&lt;/li&gt;
&lt;li&gt;104 File not open for input Reported by Read, BlockRead, Eof, Eoln, SeekEof or SeekEoln&lt;br /&gt;
if the file is not opened with Reset.
&lt;/li&gt;
&lt;li&gt;105 File not open for output Reported by write if a text file isn&amp;#8217;t opened with Rewrite.&lt;/li&gt;
&lt;li&gt;106 Invalid numeric format Reported when a non-numeric value is read from a text file, when a numeric value was expected.
&lt;/li&gt;
&lt;li&gt;150 Disk is write-protected (Critical error)
&lt;/li&gt;
&lt;li&gt;151 Bad drive request struct length (Critical error)
&lt;/li&gt;
&lt;li&gt;152 Drive not ready (Critical error)
&lt;/li&gt;
&lt;li&gt;154 CRC error in data (Critical error)
&lt;/li&gt;
&lt;li&gt;156 Disk seek error (Critical error)
&lt;/li&gt;
&lt;li&gt;157 Unknown media type (Critical error)
&lt;/li&gt;
&lt;li&gt;158 Sector Not Found (Critical error)
&lt;/li&gt;
&lt;li&gt;159 Printer out of paper (Critical error)
&lt;/li&gt;
&lt;li&gt;160 Device write fault (Critical error)
&lt;/li&gt;
&lt;li&gt;161 Device read fault (Critical error)
&lt;/li&gt;
&lt;li&gt;162 Hardware failure (Critical error)
&lt;/li&gt;
&lt;li&gt;200 Division by zero The application attempted to divide a number by zero.
&lt;/li&gt;
&lt;li&gt;201 Range check error If you compiled your program with range checking on, then you can get&lt;br /&gt;
this error in the following cases:&lt;br /&gt;
1. An array was accessed with an index outside its declared range.&lt;br /&gt;
2. Trying to assign a value to a variable outside its range (for instance an enumerated type).
&lt;/li&gt;
&lt;li&gt;202 Stack overflow error The stack has grown beyond its maximum size (in which case the size of&lt;br /&gt;
local variables should be reduced to avoid this error), or the stack has become corrupt. This&lt;br /&gt;
error is only reported when stack checking is enabled.
&lt;/li&gt;
&lt;li&gt;203 Heap overflow error The heap has grown beyond its boundaries. This is caused when trying&lt;b