<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-257419012022452178</id><updated>2024-09-14T18:40:59.413+08:00</updated><category term="ACM 程式設計解題"/><category term="C語言考古題"/><category term="C作業練習"/><category term="程式設計比賽"/><category term="C#語言教學"/><category term="Crystal Report 教學"/><category term="C語言考古題目錄"/><category term="學習C語言的成功秘訣"/><category term="C語言教學"/><category term="C語言教學影片"/><title type='text'>C語言考古題 &amp;amp; C的解題 -- 程式設計學習入門</title><subtitle type='html'>學習程式設計，語法固然重要，也是許多程式設計課程的教學重點。但是看的懂 C ，不見得會用 C 來解決問題(Problem solving)，所以學會解題是重點中的重點。&#xa;學習C語言的不二法門，就是從寫程式解題開始，這裡的考古題由淺而深，循序漸進，對初學者甚有助益。&#xa;ACM 協會針對每年程式設計比賽的練習需求，建立一個線上的題庫與評分系統，希望藉由題庫練習的機會，在此心得分享，讓有心學習程式解題的人，能有個溝通成長的橋樑。</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>liangk</name><uri>http://www.blogger.com/profile/00204918809081610386</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/x/blogger2/8146/31423219241021/150/z/417348/gse_multipart41078.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>368</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-7301494625474349112</id><published>2011-07-10T14:02:00.001+08:00</published><updated>2011-07-10T14:08:50.741+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 879 Circuit Nets，電絡網</title><content type='html'>同 &lt;a href=&quot;http://using-c.blogspot.com/2011/07/problem-793-network-connections.html&quot;&gt;793 &lt;/a&gt; Network Connections，在此不贅述。&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://acm.uva.es/p/v8/879.html&quot;&gt;p879題目連結&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/7301494625474349112/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/7301494625474349112' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/7301494625474349112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/7301494625474349112'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2011/07/problem-879-circuit-nets.html' title='Problem 879 Circuit Nets，電絡網'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-2199003523872472813</id><published>2011-07-10T13:55:00.001+08:00</published><updated>2011-07-10T14:09:14.164+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 793 Network Connections，網絡連接</title><content type='html'>此題使用 Dijkstra 演算法即可解決。&lt;br /&gt;
&lt;br /&gt;
Dijkstra 演算法可以參考：&lt;a href=&quot;http://zh.wikipedia.org/wiki/%E8%BF%AA%E7%A7%91%E6%96%AF%E5%BD%BB%E7%AE%97%E6%B3%95&quot;&gt;http://zh.wikipedia.org/wiki/%E8%BF%AA%E7%A7%91%E6%96%AF%E5%BD%BB%E7%AE%97%E6%B3%95&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://acm.uva.es/p/v7/793.html&quot;&gt;p793題目連結&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/2199003523872472813/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/2199003523872472813' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/2199003523872472813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/2199003523872472813'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2011/07/problem-793-network-connections.html' title='Problem 793 Network Connections，網絡連接'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-2197826567274139299</id><published>2011-07-10T13:35:00.001+08:00</published><updated>2011-07-10T13:35:37.236+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 10116 Robot Motion 機器人運動</title><content type='html'>這題其實也只要多建立一個相同大小的陣列紀錄步數以及重複步數值就可以了。&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;#define row 12
#define col 12

int step, r, c;

char motion[row][col];
int record[row][col];

void move(int x, int y)
{
   int i, j;
    record[x][y] = step ++;
    
    switch (motion[x][y])
 {
        case &#39;N&#39;:
            x --;
            break;
        case &#39;E&#39;:
            y ++;
            break;
        case &#39;W&#39;:
            y --;
            break;
        case &#39;S&#39;:
            x ++;
            break;
    }
    
    if (x &lt; 0 || x &gt;= r || y &lt; 0 || y &gt;= c)
    {
        printf(&quot;%d step(s) to exit\n&quot;, step - 1);
        return;
 }   
    if (record[x][y] != -1 )
    {
        int k = step - record[x][y];
     printf(&quot;%d step(s) before a loop of %d step(s)\n&quot;, step - k - 1, k);
  return;  
 }
 move(x, y);
 
}&lt;/pre&gt;&lt;br /&gt;
最後在主程式內傳入開始的 x, y 座標即可。&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://acm.uva.es/p/v101/10116.html&quot;&gt;p10116題目連結&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/2197826567274139299/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/2197826567274139299' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/2197826567274139299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/2197826567274139299'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2011/07/problem-10116-robot-motion.html' title='Problem 10116 Robot Motion 機器人運動'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-1349211968217339961</id><published>2011-07-10T12:52:00.001+08:00</published><updated>2011-07-10T12:53:16.892+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 12019 Doom&#39;s Day Algorithm</title><content type='html'>先對 Doom&#39;s Day 做解釋。&lt;br /&gt;
&lt;br /&gt;
這個神奇的方法就叫做 &quot;Doomsday Algorithm&quot;，詳細的原理就是… 每一年的二月的最後一天 (2/28 或 2/29)，和 4/4、6/6、8/8、10/10、12/12，和 9/5、5/9、7/11、11/7 (記憶口訣是 &quot;我在 7-11 的工作時間是朝 9 晚 5″)，和 3/7 (二月最後一天的一星期後)，和 1/3 (西元年不可被 4 整除) 或 1/4 (可以被 4 整除)，這些日子的星期都是一樣的，這一天叫做 Doomsday，而上面這些日子就是一年中每個月的基準日，只要配合簡單的餘數運算就可以求出今年其他日子是星期幾啦。&lt;br /&gt;
&lt;br /&gt;
但是如果要算其他年份，例如說去年的 Doomsday，怎麼辦呢 ? 因為 365 除以 7 會餘 1，也就是說每一個平常年 Doomsday 會跳一天，而閏年則會跳兩天；這樣一天，其他年份的 Doomsday 也就可以求出來，所以上面的算法也可以引申到其他年份啦。對於 19XX 年來說還有另一個速算法：先記住 1900 年的 Doomsday 是星期三；然後把 XX/12 的商和餘數，以及餘數除以 4 所得的商數，把這三個數字加起來以後，再除以 7，所得的餘數就是該年份 Doomsday 和星期三的相差數了。例如說 1937 年，XX = 37，37 / 12 商是 3 餘數是 1，1 /4 的商是 0，3 + 1 + 0 = 4，星期三再加 4 天就是星期天，也就是說 1937 年的 Doomsday 是星期天。&lt;br /&gt;
&lt;br /&gt;
可是上面只有對 19xx 年有效啊，能推廣到其他的世紀去嗎 ? 其實是可以的，只要知道了該世紀的基準日就可以算了。經由觀察可以得知各世紀的 Doomsday 是以 &quot;五三二日&quot; 的循環在輪替，也就是說 1900 年是星期三，則 1800 年就是前一個，也就是星期五，而 2000 年就是星期二了。這就是世紀基準日的速記法。有了該世紀的基準日的話，就可以套用上一段所說的算法來計算該世紀任一天的星期了。&lt;br /&gt;
&lt;br /&gt;
不過說實在的，上面這些步驟也確實太麻煩啦 !! 所以下面就有人發明了速算法：一樣是要先知道每個月的 Doomsday 基準日是那一天，然後算出你要求的日期和基準日差幾天，再把上面講的年份的那三個數字加起來，就加上該世紀 Doomsday 的星期，就是所求的那天是星期幾了。舉例來說，1937/7/7 (七七事變) 是星期幾呢 ? 先前提過，7/11 是 Doomsday，所以 7/7 就是 -4 的差距；37/12=3…1，1/4=0，-4 + 3 + 1 + 0 = 0；而 1900 年的 Doomsday 是星期三，再加上 0 天的差距，就是告訴我們 1937/7/7 是星期三。&lt;br /&gt;
&lt;br /&gt;
以上引用自 &lt;a href=&quot;http://blog.ijliao.info/archives/2004/04/07/321/&quot;&gt;http://blog.ijliao.info/archives/2004/04/07/321/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
因為我們已經知道年份為 2011，而 2011 年 Doomsday 為星期一，其實也只要用一個陣列來加加減減就好了&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;char week[7][10] = {&quot;Monday&quot;, &quot;Tuesday&quot;, &quot;Wednesday&quot;, &quot;Thursday&quot;, &quot;Friday&quot;, &quot;Saturday&quot;, &quot;Sunday&quot;};
int month[13] = {-1 ,3, 28, 7, 4, 9, 6, 11, 8, 5, 10, 7, 12};

int find(int m, int d)
{
    int index = (d - month[m]) % 7;
    index = index % 7 &lt; 0 ? index + 7: index;
    printf(&quot;%s\n&quot;, week[index]);
}&lt;/pre&gt;
讀入月份和日期，呼叫 find(m, d) 即可。
&lt;br/&gt;
&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br/&gt;
&lt;br/&gt;
&lt;a href=&quot;http://acm.uva.es/p/v120/12019.html&quot;&gt;p12019題目連結&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;&lt;br/&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/1349211968217339961/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/1349211968217339961' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/1349211968217339961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/1349211968217339961'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2011/07/problem-12019-dooms-day-algorithm.html' title='Problem 12019 Doom&#39;s Day Algorithm'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-7757076007904125259</id><published>2011-06-26T16:08:00.006+08:00</published><updated>2011-07-10T12:52:19.246+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem  11244 Counting Stars，星星 ? 物體 ?</title><content type='html'>此題利用深度優先搜尋法即可解決問題。重點 C 語言程式碼如下：&lt;pre style=&quot;background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;struct map
{
    char line[104];
}data[104];


void findStar(int i, int j)
{
    isOne ++;
    data[i].line[j] = &#39;.&#39;;
    
    if (i - 1 &gt;= 0 &amp;&amp; j - 1 &gt;= 0 &amp;&amp; data[i - 1].line[j - 1] == &#39;*&#39;)
       findStar(i - 1, j - 1);
    if (j - 1 &gt;= 0 &amp;&amp; data[i].line[j - 1] == &#39;*&#39;)
       findStar(i, j - 1);
    if (i + 1 &lt; r &amp;&amp; j - 1 &gt;= 0 &amp;&amp; data[i + 1].line[j - 1] == &#39;*&#39;)
       findStar(i + 1, j - 1);
       
    if (i - 1 &gt;= 0 &amp;&amp; data[i - 1].line[j] == &#39;*&#39;)
       findStar(i - 1, j);
    if (i + 1 &lt; r &amp;&amp; data[i + 1].line[j] == &#39;*&#39;)
       findStar(i + 1, j);    
       
    if (i - 1 &gt;= 0 &amp;&amp; j + 1 &lt; c &amp;&amp; data[i - 1].line[j + 1] == &#39;*&#39;)
       findStar(i - 1, j + 1);    
    if (j + 1 &lt; c &amp;&amp; data[i].line[j + 1] == &#39;*&#39;)
       findStar(i, j + 1);    
    if (i + 1 &lt; r &amp;&amp; j + 1 &lt; c &amp;&amp; data[i + 1].line[j + 1] == &#39;*&#39;)
       findStar(i + 1, j + 1);
}&lt;/pre&gt;
而主程式內需如此呼叫：&lt;pre style=&quot;background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;for (i = 0; i &lt; r; i ++)
{
    for (j = 0; j &lt; c; j ++)
    {
        isOne = 0;
        if (data[i].line[j] == &#39;*&#39;) findStar(i, j);
        if (isOne == 1) count ++;
    }
}&lt;/pre&gt;
打完收假。
&lt;br/&gt;
&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br/&gt;
&lt;br/&gt;
&lt;a href=&quot;http://acm.uva.es/p/v112/11244.html&quot;&gt;p11244題目連結&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;&lt;br/&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/7757076007904125259/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/7757076007904125259' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/7757076007904125259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/7757076007904125259'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2011/06/problem-11244-counting-stars.html' title='Problem  11244 Counting Stars，星星 ? 物體 ?'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-7592056427607730869</id><published>2011-06-25T18:51:00.000+08:00</published><updated>2011-06-25T18:51:16.115+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 10852 Less Prime，最小質數</title><content type='html'>此題先建立質數表 prime_table[] 後，利用以下 C 語言程式碼判斷即可：&lt;br /&gt;
&lt;pre style=&quot;background-color: rgb(238, 238, 238);&quot;&gt;j = 0;
while(prime_table[++ j] * 2 &lt;= n);&lt;/pre&gt;
&lt;a href=&quot;http://acm.uva.es/p/v108/10852.html&quot;&gt;p10852 問題連結&lt;/a&gt;
&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;ACM 題庫目錄&lt;/a&gt;
&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回到首頁&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/7592056427607730869/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/7592056427607730869' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/7592056427607730869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/7592056427607730869'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2011/06/problem-10852-less-prime.html' title='Problem 10852 Less Prime，最小質數'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-7420544060056967700</id><published>2011-06-25T16:01:00.001+08:00</published><updated>2011-06-25T16:02:37.302+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 10579 Fibonacci Numbers，超大費氏級數</title><content type='html'>此題需要利用大數相加即可， line 為 1001，len 由各位去拿捏這尺寸需要多少才夠，記得要宣告 int fn[line][len];。&lt;br /&gt;
重點 C 語言程式碼如下：&lt;br /&gt;
&lt;pre style=&quot;background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;void createFn()
{
    int i, j, k;
    fn[0][0] = 0;
    fn[1][0] = 1;
    for(i = 2 ; i &lt; line ; i ++)
    {
        for(j = 0 ; j &lt; len ; j ++)
        {
            fn[i][j] += fn[i - 1][j] + fn[i - 2][j];
            if(fn[i][j] &gt; 9)
            {
                fn[i][j + 1] += fn[i][j] / 10;
                fn[i][j] %= 10;
            }
        }
    }
}&lt;/pre&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://acm.uva.es/p/v105/10579.html&quot;&gt;p10579題目連結&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/7420544060056967700/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/7420544060056967700' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/7420544060056967700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/7420544060056967700'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2011/06/problem-10579-fibonacci-numbers.html' title='Problem 10579 Fibonacci Numbers，超大費氏級數'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-1387026834800498276</id><published>2010-09-25T17:10:00.002+08:00</published><updated>2010-09-30T16:03:08.862+08:00</updated><title type='text'>版主新書發表：C#程式設計學以致用</title><content type='html'>&lt;h4&gt;緣起&lt;/h4&gt;&lt;br /&gt;剛開始建立這個部落格時，只是想找個地方，將我在大學針對多半高中時期偏文組之初學新生所編寫的程式設計課程內容堆積起來，隨著時間流逝，也就這麼堆著堆著，還堆出了不少東西。在長江後浪推前浪的歷史軌跡上，讓我在課程內容上有著推陳出新的機會。&lt;br /&gt;&lt;br /&gt;程式設計是個有門檻的迷人玩意兒，很多學會寫程式的同學都能體會那種達成解題任務的快感，當快感持續，進行ACM解題目即自然而然的成為茶餘飯後之消遣，一但到達這個田地，便不自覺功力大增，頗有騰雲駕霧之勢。&lt;br /&gt;&lt;br /&gt;C語言是許多程式設計初學者接觸到的第一個語言，C語言嚴謹易學，用來學習程式邏輯的確是個不錯的選擇。大三、大四的同學在做專題時，都能延伸C語言的程式邏輯，對其他語言的學習如Java, C#, Javascript或php等，就好比已打通任督二脈的武者，對不同派系武功都能信手拈來、快速上手，其中有許多同學是使用C#做為網頁或視窗程式的開發工具。&lt;br /&gt;&lt;br /&gt;經過一段時間的市場演進，系上在檢討後，決定開始以C#做為程式設計初學者的第一個語言。我在98學年度開始使用C#來教程式設計，在選擇教科書的過程中，我遇到一些難題。現有出版的C#教學書籍大多以學習Visual C#為主軸，因此對C#開發視窗程式、網頁程式、資料庫等方面均多有著墨，但是對於如何學會寫程式，或深入應用C#語言就相當少見，殊為可惜。基於這些原因，便起心動念針對這幾年的程式設計教學經驗，編寫一個既可教同學寫程式、又能讓同學熟練C#語言應用的教學用書，書名為「C#程式設計學以致用」。98學年結束後，從我教授班走出去的同學中的三分之一已學會寫程式解題。這學期啟用這本書後，我相信學會寫程式的同學比例會徙增，更希望他們因此上癮，也能享受那種騰雲駕霧之感。&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;購書資訊&lt;/h4&gt;&lt;br /&gt;本書係以我教授的對象為主，因而並未交由出版社發行，僅在&lt;a href=&quot;http://using-c-sharp.blogspot.com/&quot;&gt;http://using-c-sharp.blogspot.com&lt;/a&gt;部落格銷售。期待想學寫程式的初學者在獲得本書後，利用其中循序漸進設計之題目，上機練習，您將會感覺到學習效果，而習得以C#語言解決問題的能力短時可見。&lt;br /&gt;&lt;br /&gt;謹致&lt;br /&gt;&lt;br /&gt;梁克新</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/1387026834800498276/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/1387026834800498276' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/1387026834800498276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/1387026834800498276'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/09/c.html' title='版主新書發表：C#程式設計學以致用'/><author><name>liangk</name><uri>http://www.blogger.com/profile/00204918809081610386</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/x/blogger2/8146/31423219241021/150/z/417348/gse_multipart41078.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-6135167228735802708</id><published>2010-09-01T23:29:00.006+08:00</published><updated>2010-09-02T08:43:08.134+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Crystal Report 教學"/><title type='text'>Crystal Report 參數</title><content type='html'>Crystal Report 參數可在程式中傳入數值至報表中顯示或者做其他判斷使用。接下來就是幾個基本步驟設定。&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;color: black;&quot;&gt;有問題請一定要發問!如果圖片太小，可再點擊進去看大圖。&lt;/h3&gt;&lt;h3 style=&quot;color: black;&quot;&gt;1.&lt;/h3&gt;在「欄位總管」中的「參數欄位」點擊右鍵，按下「新增」（如圖一）。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5SoFtqRinBQ4KJ9-OWdnoWHj6B0katVntGHs6zU7tTeNL1hpIAZxrk4NjWutYYRqE6XTyeuopuTM0LqKpsNGVyx6Z5WFgshg7Ms1av1_jX4yMf8meCWU8zcXXaLn0g6_Cd_GmKwEcHaU/s1600/7.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 213px; height: 45px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5SoFtqRinBQ4KJ9-OWdnoWHj6B0katVntGHs6zU7tTeNL1hpIAZxrk4NjWutYYRqE6XTyeuopuTM0LqKpsNGVyx6Z5WFgshg7Ms1av1_jX4yMf8meCWU8zcXXaLn0g6_Cd_GmKwEcHaU/s400/7.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5511974390669432642&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖一&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;2.&lt;/h3&gt;此時會跳出「建立參數欄位」的視窗，鍵入自訂名稱，並且選擇數值類型，按下「確定」（如圖二）。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4DIaoKrDkla3I8ueopP1Qjvddw52oRK9K_-UOsakkNPqoBzsVTG0L-4GmtOAFD2Gyjp4Y-VVf7GzIZ2w7_QRywddaX1rjvDSzjQ0xvNQUuYQ-dDBpdY583T7sedM7vM6BzavqjRt3ZT4/s1600/8.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 278px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4DIaoKrDkla3I8ueopP1Qjvddw52oRK9K_-UOsakkNPqoBzsVTG0L-4GmtOAFD2Gyjp4Y-VVf7GzIZ2w7_QRywddaX1rjvDSzjQ0xvNQUuYQ-dDBpdY583T7sedM7vM6BzavqjRt3ZT4/s400/8.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5511974402579574946&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖二&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;3.&lt;/h3&gt;確定後「參數欄位」下會多一個欄位，即為剛剛建立的欄位（如圖三）。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-AqSVQFj9_VCDVDCnOaN1gw2bT70HYqIQWToGXsw-Gvy246oBL274gzEzy1tTJ4ZgW7w4B47xgR53dysHZ4iVvljriDsjI7se2_EAyvMIzuPqUTExFQm4hEOUD3o2Dta91tR6EKZ2qo4/s1600/9.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 203px; height: 40px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-AqSVQFj9_VCDVDCnOaN1gw2bT70HYqIQWToGXsw-Gvy246oBL274gzEzy1tTJ4ZgW7w4B47xgR53dysHZ4iVvljriDsjI7se2_EAyvMIzuPqUTExFQm4hEOUD3o2Dta91tR6EKZ2qo4/s400/9.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5511974410511342738&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖三&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;4.&lt;/h3&gt;接著可以利用這建立出來的欄位，拖曳到報表上利用（如圖四），而在程式碼之中，只需多加傳遞參數的函式 SetParameterValue ，傳入兩參數為參數欄位名稱與值（如圖五），最後執行報表後就會顯示出你所傳遞的值（如圖六）。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1cclvr0XEZox5n0AYfp2yevXC5_ak0EYmuhYXU4xJqPnCQRBvlSnIO-Sh3ExCNHzW9qRMIt94jjNG9b5Ycaf1LlbIje8t9SvFy_9e2YRNPUpUKnCRyhAhGplLR0e0DM65djtJ9jceEEQ/s1600/10.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 287px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1cclvr0XEZox5n0AYfp2yevXC5_ak0EYmuhYXU4xJqPnCQRBvlSnIO-Sh3ExCNHzW9qRMIt94jjNG9b5Ycaf1LlbIje8t9SvFy_9e2YRNPUpUKnCRyhAhGplLR0e0DM65djtJ9jceEEQ/s400/10.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5511974417635095938&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖四&lt;/center&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisedR1Ko1_ns_9vidnMmJrK4osxxffZ4GC-t6WgnaZb183WnCXlYbKG-hMDSOgoZ_2qOk-oMfDDNAoTe0PIvTM7mbBoBz_GDz_p7awgQB2X7m9qUPG1Nqst44rhnlPsrrGNb8LYp_MNQ0/s1600/11.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 365px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisedR1Ko1_ns_9vidnMmJrK4osxxffZ4GC-t6WgnaZb183WnCXlYbKG-hMDSOgoZ_2qOk-oMfDDNAoTe0PIvTM7mbBoBz_GDz_p7awgQB2X7m9qUPG1Nqst44rhnlPsrrGNb8LYp_MNQ0/s400/11.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5511974422516231954&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖五&lt;/center&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi16EJGJm5lSC82WVXgpu4X0_qDXOlUyvv9j4wFl9MC2F0xwsBqubml86tOm_AfHpKdg0hFT67gBe9dAEfIRdH3KX_L7WCjlT7NxY1eUKPKRoB0vxjIixf-iW8RloL6sgI7raBnqEdu0Nw/s1600/12.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 106px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi16EJGJm5lSC82WVXgpu4X0_qDXOlUyvv9j4wFl9MC2F0xwsBqubml86tOm_AfHpKdg0hFT67gBe9dAEfIRdH3KX_L7WCjlT7NxY1eUKPKRoB0vxjIixf-iW8RloL6sgI7raBnqEdu0Nw/s400/12.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5511980798348094594&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖六&lt;/center&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/6135167228735802708/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/6135167228735802708' title='7 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/6135167228735802708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/6135167228735802708'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/09/crystal-report_01.html' title='Crystal Report 參數'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5SoFtqRinBQ4KJ9-OWdnoWHj6B0katVntGHs6zU7tTeNL1hpIAZxrk4NjWutYYRqE6XTyeuopuTM0LqKpsNGVyx6Z5WFgshg7Ms1av1_jX4yMf8meCWU8zcXXaLn0g6_Cd_GmKwEcHaU/s72-c/7.jpg" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-2511463049087179277</id><published>2010-09-01T00:28:00.004+08:00</published><updated>2010-09-02T00:21:38.967+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Crystal Report 教學"/><title type='text'>Crystal Report 公式</title><content type='html'>Crystal Report 公式功能能使報表看起來看簡潔，也可將顯示欄位合併，讓欄位數量減少，讓報表得以有更多空間顯示其他資料。接下來就是幾個基本步驟設定。&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;color: black;&quot;&gt;有問題請一定要發問!如果圖片太小，可再點擊進去看大圖。&lt;/h3&gt;&lt;h3 style=&quot;color: black;&quot;&gt;1.&lt;/h3&gt;在左側欄位總管的公式欄位點擊右鍵，按下「新增」（如圖一）。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWuvvMbmjMyJqhemiFrQp5OMNoyLoH49LVIMeHkXzRrytu4z-2_ivaMf18hr_tvfb1YpSU9JpDdNSgyN7CWrgAivMjz_6OYWaJkPplZVy6KjRX-SDznqr0J8CVr6ot-CCqqRjwkL2Us2k/s1600/1.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 215px; height: 256px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWuvvMbmjMyJqhemiFrQp5OMNoyLoH49LVIMeHkXzRrytu4z-2_ivaMf18hr_tvfb1YpSU9JpDdNSgyN7CWrgAivMjz_6OYWaJkPplZVy6KjRX-SDznqr0J8CVr6ot-CCqqRjwkL2Us2k/s400/1.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5511613641756479858&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖一&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;2.&lt;/h3&gt;此時會跳出一「公式名稱」之視窗，命名後按下使用編輯器（如圖二）。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw_BxLEoX_bl2DFklTeBU6QflE7MKW7TzAtg1ugCqIJfDg4k59nipxmfRSQlDab76BLn0xN-3JHWdpAo_AqzVKVFbLvzEQ80p57aJFMezcrxmWT5qGTkdPQs9ctD89PJdqq3pJn-2IDj4/s1600/2.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 100px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw_BxLEoX_bl2DFklTeBU6QflE7MKW7TzAtg1ugCqIJfDg4k59nipxmfRSQlDab76BLn0xN-3JHWdpAo_AqzVKVFbLvzEQ80p57aJFMezcrxmWT5qGTkdPQs9ctD89PJdqq3pJn-2IDj4/s400/2.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5511613644772923602&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖二&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;3.&lt;/h3&gt;接下來會跳出設計公式的視窗（如圖三），可以在右下方處編輯此公式欄位所要顯示之資料，使用的是 Crystal 語法，可以搭配資料庫欄位之值且可再加以變化，而 Crystal 語法類似 C#，右上方兩格視窗有函式與運算子，可以用拖曳方式將函式或運算子到右下方編輯公式處（資料庫欄位也可拖曳），如此一來，公式欄位可以說是千變萬化，設定完成後，在左上方按下「儲存並離開」。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR6FTRjEEzYxb-SiC7ceMQemdQpO0iZGhHNVmAWPOWOpI30HDElfZcdLkmPbxk6iQuckRkfmIY40hmVEje3aTaOOnoNt0AxtL7J-yKL6vtuiyD-SBNX5QESOaId-6qFPqazRX_IWpKUgs/s1600/3.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 301px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR6FTRjEEzYxb-SiC7ceMQemdQpO0iZGhHNVmAWPOWOpI30HDElfZcdLkmPbxk6iQuckRkfmIY40hmVEje3aTaOOnoNt0AxtL7J-yKL6vtuiyD-SBNX5QESOaId-6qFPqazRX_IWpKUgs/s400/3.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5511613649514640866&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖三&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;4.&lt;/h3&gt;此時在欄位總管中的公式欄位會多一欄位（如圖四），即是剛剛設定完成的欄位。這時就可將此欄位拖曳至報表運用（如圖五），最後顯示出來（如圖六）。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0NlD_GCp8XLoRonSQEMCSYBnB01kOKCt9j9UfDNmls14P_lAsDGeUUWfIf4otkqGi78B7ZndL6FlD-27tMKtg64EtIbKofl7Oojue62qvUSsFXJxwHm993RuDeSbpGwli42muZLwOz2w/s1600/4.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 212px; height: 39px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0NlD_GCp8XLoRonSQEMCSYBnB01kOKCt9j9UfDNmls14P_lAsDGeUUWfIf4otkqGi78B7ZndL6FlD-27tMKtg64EtIbKofl7Oojue62qvUSsFXJxwHm993RuDeSbpGwli42muZLwOz2w/s400/4.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5511613659422315938&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖四&lt;/center&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK6hu6mexwpHZ8IHszQ0EdIWSt7LZd21coRK987IGPr7UVcg4IkXirSllbYACmBlym0GZW9eFS2r7-cBXWHaqIKQwMYePNIMAED4fkJXsjFowPPQXOpNG9CArKqATeD3i47VEuDsv_Mec/s1600/5.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 264px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK6hu6mexwpHZ8IHszQ0EdIWSt7LZd21coRK987IGPr7UVcg4IkXirSllbYACmBlym0GZW9eFS2r7-cBXWHaqIKQwMYePNIMAED4fkJXsjFowPPQXOpNG9CArKqATeD3i47VEuDsv_Mec/s400/5.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5511613665393213490&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖五&lt;/center&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7ioDtXBF3VB_ULUvHTVe0mi38gS4TyRrmnYhDqXHM3ZjKvobj34dj61JxmZdBWG3UOX2ubLZ3TODXKGQ_M1daPFM381WbCLdB9G-Wuk454Rm7HfK_C27qDWFtvSO7EpW6A6e9-qbUEbg/s1600/6.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 143px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7ioDtXBF3VB_ULUvHTVe0mi38gS4TyRrmnYhDqXHM3ZjKvobj34dj61JxmZdBWG3UOX2ubLZ3TODXKGQ_M1daPFM381WbCLdB9G-Wuk454Rm7HfK_C27qDWFtvSO7EpW6A6e9-qbUEbg/s400/6.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5511617711262188082&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖六&lt;/center&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/2511463049087179277/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/2511463049087179277' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/2511463049087179277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/2511463049087179277'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/09/crystal-report.html' title='Crystal Report 公式'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWuvvMbmjMyJqhemiFrQp5OMNoyLoH49LVIMeHkXzRrytu4z-2_ivaMf18hr_tvfb1YpSU9JpDdNSgyN7CWrgAivMjz_6OYWaJkPplZVy6KjRX-SDznqr0J8CVr6ot-CCqqRjwkL2Us2k/s72-c/1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-799133160923313169</id><published>2010-08-20T10:09:00.009+08:00</published><updated>2010-08-25T07:23:49.930+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Crystal Report 教學"/><title type='text'>Crystal Report 群組</title><content type='html'>此次要教大家如何使用 Crystal Report 群組的功能，便於在報表上分類與分區能使報表資訊更清楚顯示，使用過程並不困難，只有幾個步驟，在 &lt;a href=&quot;http://using-c.blogspot.com/2010/08/crystal-report_15.html&quot;&gt;Crystal Report 基本使用&lt;/a&gt; 上已有教大家怎麼建置基本的 Crystal Report。接下來就是幾個基本步驟設定。&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;color: black;&quot;&gt;有問題請一定要發問!如果圖片太小，可再點擊進去看大圖。&lt;/h3&gt;&lt;h3 style=&quot;color: black;&quot;&gt;1.&lt;/h3&gt;在報表上任一空白處點擊右鍵，選擇「插入」、點擊「群組」，如圖所示（如圖一）。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-fFUoTE6rDZ7FOTCi-QJL2A4vi4hVPMyCklpj5mY9k-vVJclHna9fyweqXQuIEoUF8Rf_Jkr1J1E59_qmygZKNQ8wD2i3kMQnfqdNBup2aCSEyc9SDTr4ln1TIs4vLgTQksN2Wvi1UbQ/s1600/1.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 230px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-fFUoTE6rDZ7FOTCi-QJL2A4vi4hVPMyCklpj5mY9k-vVJclHna9fyweqXQuIEoUF8Rf_Jkr1J1E59_qmygZKNQ8wD2i3kMQnfqdNBup2aCSEyc9SDTr4ln1TIs4vLgTQksN2Wvi1UbQ/s400/1.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5507351165556540754&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖一&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;2.&lt;/h3&gt;此時會跳出「插入群組」視窗（如圖二），此時先視資料庫需用哪個欄位分類，而我在資料庫加了一個 Related 欄位（如圖三），便於在報表上分類，所以此時在「插入群組」視窗中需選擇 Related 欄位（如圖四）並按下確定。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ8hWcshtd3PsbG3XMhdFQE1IRRJrijNUDQkqmwOXQJ1Fv90hVaMJaN6t9g5dxsi9KjGNTimwIjeDPoy7jCox9O-PnKnzxhknyL48abEKTHN017WXd7wtk2G6kph93cjh5B3aesCk8t1o/s1600/2.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 346px; height: 279px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ8hWcshtd3PsbG3XMhdFQE1IRRJrijNUDQkqmwOXQJ1Fv90hVaMJaN6t9g5dxsi9KjGNTimwIjeDPoy7jCox9O-PnKnzxhknyL48abEKTHN017WXd7wtk2G6kph93cjh5B3aesCk8t1o/s400/2.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5507353233988266914&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖二&lt;/center&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ_OdhrkJlj2euTaeRo5BijNXpenqSA1SZmZFUMQ1HHcbaS57Hcwag2p2JUpOd0218WLIjNQejVdHIVbRrwvMA-IfqcxCOpLbLvzAUsZ4FT5-XC5iu05pqJb7SEVN8V5a3gSVZQmgXuaY/s1600/7.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 106px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ_OdhrkJlj2euTaeRo5BijNXpenqSA1SZmZFUMQ1HHcbaS57Hcwag2p2JUpOd0218WLIjNQejVdHIVbRrwvMA-IfqcxCOpLbLvzAUsZ4FT5-XC5iu05pqJb7SEVN8V5a3gSVZQmgXuaY/s400/7.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5507353481042325426&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖三&lt;/center&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJKJlsmrdKUXgh65-JKm2dN6UAyuGh1MAPMBGixb8FKCgOpdE-_4qGwtyTzC6_IuFYUk8vRNuHzfl_ch_o35RfNAY0lsdcsyB9HLQ32iG0kuV-X45Nw4bkvdKrTkN2uS82qjCk73exqtk/s1600/3.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 347px; height: 279px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJKJlsmrdKUXgh65-JKm2dN6UAyuGh1MAPMBGixb8FKCgOpdE-_4qGwtyTzC6_IuFYUk8vRNuHzfl_ch_o35RfNAY0lsdcsyB9HLQ32iG0kuV-X45Nw4bkvdKrTkN2uS82qjCk73exqtk/s400/3.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5507353241923735922&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖四&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;3.&lt;/h3&gt;加入群組後，會出現一群組首與群組尾的區塊（如圖五），方便設計一些以群組為主的圖片或背景，增加美感。接著我將剩下的資料庫欄位擺入（如圖六）報表中，執行後，就變成以 Related 欄位分類的報表（如圖七）。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy6B8R16FV1IElfXdiTmogoKG_xqxuADv4Nt1OKtGiPvDJS4gsJENWdKIVEOAtMXEgAxf9xOa3vh8-CRFcNt0yEMHQnGUkGLmErjzmZPvNKwxrD_bNjTiU0ToJuCg3gqwN8u0VovJKLhY/s1600/4.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 344px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy6B8R16FV1IElfXdiTmogoKG_xqxuADv4Nt1OKtGiPvDJS4gsJENWdKIVEOAtMXEgAxf9xOa3vh8-CRFcNt0yEMHQnGUkGLmErjzmZPvNKwxrD_bNjTiU0ToJuCg3gqwN8u0VovJKLhY/s400/4.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5507353246369301362&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖五&lt;/center&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyT1xZ69_EZU0dIVmRnouK8WEdwirgOOTQDH7F35KXUjvKt9Lm4ZPyfGDba85vY7Mgdv2tk1xzP3-F64GSfCgE7cWy2KyVJU6tI6pA8d_-RtYn7jlQbzkWO2mX5NGk5CpMXwaGuHAyhhs/s1600/5.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 255px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyT1xZ69_EZU0dIVmRnouK8WEdwirgOOTQDH7F35KXUjvKt9Lm4ZPyfGDba85vY7Mgdv2tk1xzP3-F64GSfCgE7cWy2KyVJU6tI6pA8d_-RtYn7jlQbzkWO2mX5NGk5CpMXwaGuHAyhhs/s400/5.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5507353256908980114&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖六&lt;/center&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmqje3UWPH_rQo77Y4AzwfAyJuykamjejA2JcSJ7n7umVUANGJ2OUvoYkpIc0vSLVAU-uChjTl-ImLxH9lsiR_qCAT-KwKmAGSB3gchZ9799WiuRPTZoGmJ0LjZkI10bZxKqj0FiJWC7g/s1600/6.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 180px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmqje3UWPH_rQo77Y4AzwfAyJuykamjejA2JcSJ7n7umVUANGJ2OUvoYkpIc0vSLVAU-uChjTl-ImLxH9lsiR_qCAT-KwKmAGSB3gchZ9799WiuRPTZoGmJ0LjZkI10bZxKqj0FiJWC7g/s400/6.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5507353259287422642&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖七&lt;/center&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/799133160923313169/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/799133160923313169' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/799133160923313169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/799133160923313169'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/08/crystal-report_20.html' title='Crystal Report 群組'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-fFUoTE6rDZ7FOTCi-QJL2A4vi4hVPMyCklpj5mY9k-vVJclHna9fyweqXQuIEoUF8Rf_Jkr1J1E59_qmygZKNQ8wD2i3kMQnfqdNBup2aCSEyc9SDTr4ln1TIs4vLgTQksN2Wvi1UbQ/s72-c/1.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-2398768602608112847</id><published>2010-08-15T20:37:00.009+08:00</published><updated>2010-08-21T11:11:19.702+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Crystal Report 教學"/><title type='text'>Crystal Report 基本使用</title><content type='html'>最近小弟在研究 Crystal Report 的用法，並且做了很多報表，一開始覺得用這個很麻煩，因為使用的項目還蠻多的，且版面要自己設計。但其實用熟了，就沒甚麼差了，所以在此分享 Crystal Report 的使用心得，當作是&lt;span style=&quot;font-weight: bold;&quot;&gt;教學範例&lt;/span&gt;。我會從建置網頁、資料集新增與設定、Crystal Report 新增與設定到最後匯入資料的逐步順序說起，無非是因為給第一次使用 Crystal Report 的人也能照著下列步驟做起，重點是要玩出心得，這就不枉我寫這篇網誌了。&lt;br /&gt;&lt;br /&gt;環境： windows 7、vs 2008&lt;br /&gt;&lt;h3 style=&quot;color: black;&quot;&gt;有問題請一定要發問!如果圖片太小，可再點擊進去看大圖。&lt;/h3&gt;&lt;h3 style=&quot;color: black;&quot;&gt;1.&lt;/h3&gt;在左上角新增一個空白網站（如圖一），或者開啟已有網站。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaYMVbcitXv29M7wxs0W0NNbvWBzFVjJQaKalQIex_dTRaPi4u2BGeJbZ8N9MD1L6JrhSzDz8yz8XhxaZGCWpONOd0c03gco16DGkZfm7dQ2F3rVsu2etlu9_KsJ-cRImKFXIF0lrJ4js/s1600/1.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 265px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaYMVbcitXv29M7wxs0W0NNbvWBzFVjJQaKalQIex_dTRaPi4u2BGeJbZ8N9MD1L6JrhSzDz8yz8XhxaZGCWpONOd0c03gco16DGkZfm7dQ2F3rVsu2etlu9_KsJ-cRImKFXIF0lrJ4js/s320/1.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505572878865251698&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖一&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;2.&lt;/h3&gt;開啟或新增網站後，在工具列上會找到「報告」的分類，而現在所要用到的控制項，就是圖中（如圖二）所指的控制項，名稱為「CrystalReportViewer」。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMo_TxYV2VywHwBDdPwZhmDswriY0-d_ed7AE1mOiNU0zAd7o7MTXGcgFdjIHLJgqK7ALEdgOStHx4YGrfmwwi7wb8jc40nzdPbJX1_VMb5y6yukQ7u_mY4nlJ8pCNRozj7g3QBe65hec/s1600/4.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 295px; height: 150px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMo_TxYV2VywHwBDdPwZhmDswriY0-d_ed7AE1mOiNU0zAd7o7MTXGcgFdjIHLJgqK7ALEdgOStHx4YGrfmwwi7wb8jc40nzdPbJX1_VMb5y6yukQ7u_mY4nlJ8pCNRozj7g3QBe65hec/s320/4.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505574883591379138&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖二&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;3.&lt;/h3&gt;將此控制項拖曳到網頁(*.aspx)程式碼內，如圖（如圖三），並命名此控制項之 ID 為 CrystalReportViewer1。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZj-id26nojKMQEJpD4XeOZwVyHsbkHP-QYepj8zjk-oI9jiV-2lNWDptMV1decTVqxeWuZ4KMD4ZK0qyU4aoKkH-XP32b7QoA2V3cwRYtZAQCUi-OGRn_4Mo1cTtQo2sUXyEQ65lXwlA/s1600/5.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 164px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZj-id26nojKMQEJpD4XeOZwVyHsbkHP-QYepj8zjk-oI9jiV-2lNWDptMV1decTVqxeWuZ4KMD4ZK0qyU4aoKkH-XP32b7QoA2V3cwRYtZAQCUi-OGRn_4Mo1cTtQo2sUXyEQ65lXwlA/s400/5.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505616653160798258&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLtp2MXgeSmeu7Ke0wEO2tpU4VlQY6KHoxCcKDgyNFuVJmr3z3KQlQKqGdfQvNKoMcFjTm79dc7Xi2klYlXksXJOWr9mm05nsbxDDzXhVlqPznjlncjtf3mW5HAx4Kn0pB8sQKtuXstuw/s1600/5.jpg&quot;&gt;&lt;/a&gt;&lt;center&gt;圖三&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;4.&lt;/h3&gt;接著在方案總管的空白處按右鍵，選擇「加入新項目」，會跳出視窗（如圖四），選擇「資料集」，命名後按下加入。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZxs5qWg0MiMRoikl0qaLzxmx4Bg2gkrixn3XXl_TH5kkP3c6oRSt8wFZqJA5LH5TEdymKidzRi5DVt2ZvFkrjolDVzeKnDo7U6uKy1UVph9tWQyKrDvZnx_B3lRllGAZLVnMOzcMBOQU/s1600/6.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 279px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZxs5qWg0MiMRoikl0qaLzxmx4Bg2gkrixn3XXl_TH5kkP3c6oRSt8wFZqJA5LH5TEdymKidzRi5DVt2ZvFkrjolDVzeKnDo7U6uKy1UVph9tWQyKrDvZnx_B3lRllGAZLVnMOzcMBOQU/s400/6.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505616478205255298&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3uBb6z71Ovv35l_6HC_-lw5-i6bKXaYJUlO_J3BnxJqLuPaSCrJBohPezw878uut1JyY8FTYM0wka5uYwEXRAnmaQ9OxqEwqOnwTC21awS5Axk1DWefFCPPSW8Edl2yskynTzM5dDHAE/s1600/6.jpg&quot;&gt;&lt;/a&gt;&lt;center&gt;圖四&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;5.&lt;/h3&gt;在這之前，要先確定資料表名稱以及欄位名稱，因為是初步教學，所以我隨手建立一個資料表，內容也是亂打的（如圖五）。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9rHfPS2XANXhP9INbr8wloP_9Z0ieKeLirO1-CH6bzNUHfIzBiaZEMCNU9jpjX6O529WPLpTBGengXHmMf_K4Z_wA2onMHiTnDy4ReKSQdR5okCnnOWCjJISHx60Hv9_vkvACpjD0qIk/s1600/7.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 168px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9rHfPS2XANXhP9INbr8wloP_9Z0ieKeLirO1-CH6bzNUHfIzBiaZEMCNU9jpjX6O529WPLpTBGengXHmMf_K4Z_wA2onMHiTnDy4ReKSQdR5okCnnOWCjJISHx60Hv9_vkvACpjD0qIk/s400/7.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505616853738235698&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtZ7uFRr017BvrlTXTrVifp7AqbAUvxSANQWX9DcPClZVxkxjl9-DlHpyfuPJcyIaTaCCnf5JbCwos59ggFGqF7h_G3KCwRc03liAxFSvI5SwoJWCAto0qnpLHjTYsCdFhxzB-Td4BCDU/s1600/7.jpg&quot;&gt;&lt;/a&gt;&lt;center&gt;圖五&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;6.&lt;/h3&gt;延續第三步驟，加入資料集後，對隨處對中間空白區域點擊右鍵，選擇加入，再選擇「TableAdapter」（如圖六）。接下來會跳出幾個基本設定視窗（如圖七、圖八、圖九、圖十、圖十一），比較注意的是圖九中的設定，因為它是決定報表連接的欄位，而不是資料的內容，所以在這裡的設定要小心，其中圓圈 1 的區塊是下達查詢語法，圓圈 2 的按鈕是可以讓你嘗試查詢語法是否正確，下達正確後再傳到圓圈 1 的區塊。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil1oiUh9f0dHCEVUaHRTYEFOEB5q938aOy3PdUdvOUUKFFhNCDurKrF1Mp2IESfOPeF8S2u-o4ARC9nxbWkrdXmFoQtxV2dSEAL9lB8xlsUCwGWgj2zD9g0emflJm2j8fgsKKkFmBaHq0/s1600/9.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 280px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil1oiUh9f0dHCEVUaHRTYEFOEB5q938aOy3PdUdvOUUKFFhNCDurKrF1Mp2IESfOPeF8S2u-o4ARC9nxbWkrdXmFoQtxV2dSEAL9lB8xlsUCwGWgj2zD9g0emflJm2j8fgsKKkFmBaHq0/s320/9.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505590816400914226&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖六&lt;/center&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5N25au9JFCYXsAdsy7RnzguLXTP6vfOPhZW2ru1QgcYVp6xK3p5Wife3Y2DKIbWhM7jrI75ykOc7jFteCkc6WnObxSMw0k74ymAhFPauyMzyuNwJ_eHLBqphU_uhqXXmnj3fj6yuiHaI/s1600/10.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 286px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5N25au9JFCYXsAdsy7RnzguLXTP6vfOPhZW2ru1QgcYVp6xK3p5Wife3Y2DKIbWhM7jrI75ykOc7jFteCkc6WnObxSMw0k74ymAhFPauyMzyuNwJ_eHLBqphU_uhqXXmnj3fj6yuiHaI/s320/10.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505590820884270562&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖七&lt;/center&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwIj-Vo9gx65IUrBvR4Rr1_RffbM3Z5cVZNjr5DFYckmiI2CVuBF_mYf9rFDc82TXIzO4VUCni8zgqeeoYKaZopAWD_SjBHXJUsElPNi2gN4ewiJxmRcRJFQBdjdtq3Lq1x6-m3V-xrbM/s1600/11.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 282px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwIj-Vo9gx65IUrBvR4Rr1_RffbM3Z5cVZNjr5DFYckmiI2CVuBF_mYf9rFDc82TXIzO4VUCni8zgqeeoYKaZopAWD_SjBHXJUsElPNi2gN4ewiJxmRcRJFQBdjdtq3Lq1x6-m3V-xrbM/s320/11.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505590826498172850&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖八&lt;/center&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPjNAmQh-KTnjCIJ13m0gtd-wBstpRsHKY-jiESiJMDifbCSExDtaNeXZSGtEXoBiCORhOY15VSRBR8OaCG-5ZJA6LXOM5wkHnM8ZZhlyXUK390FcS4Ic_WVZVVuY2A0p8u7HkOyPYYEk/s1600/12.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 283px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPjNAmQh-KTnjCIJ13m0gtd-wBstpRsHKY-jiESiJMDifbCSExDtaNeXZSGtEXoBiCORhOY15VSRBR8OaCG-5ZJA6LXOM5wkHnM8ZZhlyXUK390FcS4Ic_WVZVVuY2A0p8u7HkOyPYYEk/s320/12.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505590830367386530&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖九&lt;/center&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimcgoCmOvk3vEZz9QgIVDWXOV_6UsYiAEm1PmNy5AIHDPBW4ogV6-8k7PLLCjtHs3leO2VrYa1aqr2a_1mzBxCLCeAo7bLTf56DBwXOCAVE0cPucyOFzKyRC6_zXla5O28uWTnw2rjSK0/s1600/13.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 282px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimcgoCmOvk3vEZz9QgIVDWXOV_6UsYiAEm1PmNy5AIHDPBW4ogV6-8k7PLLCjtHs3leO2VrYa1aqr2a_1mzBxCLCeAo7bLTf56DBwXOCAVE0cPucyOFzKyRC6_zXla5O28uWTnw2rjSK0/s320/13.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505590840118211778&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖十&lt;/center&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiikK1EjN_hmH8OOqcBAVDoE7Ijc_rc4bQ602NuhVS_uMw5hRY_z82AKMYnyBEbbSL9enKZudKJiXrF5-qrdc6ViZERC3Q1DjqVh0sPSMF_iNUoBs9eCiCrd58O0b4STtlhUKIYOeB02D0/s1600/14.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 282px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiikK1EjN_hmH8OOqcBAVDoE7Ijc_rc4bQ602NuhVS_uMw5hRY_z82AKMYnyBEbbSL9enKZudKJiXrF5-qrdc6ViZERC3Q1DjqVh0sPSMF_iNUoBs9eCiCrd58O0b4STtlhUKIYOeB02D0/s320/14.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505592326469360210&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖十一&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;7.&lt;/h3&gt;設定完成後，會出現如圖（如圖十二）所示。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMBVa-EIzHn1IM85Qha7QfPB0s2vFMqKiFzstX6x4ymgchzmTxeyw3_71h2rW7e0dJF6dME5llvFgJUbDzdJFqT9f1nQZSRf5y-p6M74pAuxdHwnFNudZS0B8iSh0hAzrVwfZ4EMHuX00/s1600/15.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 171px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMBVa-EIzHn1IM85Qha7QfPB0s2vFMqKiFzstX6x4ymgchzmTxeyw3_71h2rW7e0dJF6dME5llvFgJUbDzdJFqT9f1nQZSRf5y-p6M74pAuxdHwnFNudZS0B8iSh0hAzrVwfZ4EMHuX00/s320/15.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505595043356207538&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖十二&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;8.&lt;/h3&gt;接著在方案總管的空白處按右鍵，選擇「加入新項目」，會跳出視窗（如圖十三），選擇「Crystal Report」，命名後按下加入。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMHTyrqzQETHBzzFBta8UvijoVbMbFKWHHxJeLeXZ6Up9E9aieG17zr3WZPReNo7TbR-6v2DGPjj9eEdsBte5GHa0LY5lu-6gtSMswYXloeHdw9y_M5FRKyFr_X8cX6Wxhwh0vAzcdw2E/s1600/16.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 282px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMHTyrqzQETHBzzFBta8UvijoVbMbFKWHHxJeLeXZ6Up9E9aieG17zr3WZPReNo7TbR-6v2DGPjj9eEdsBte5GHa0LY5lu-6gtSMswYXloeHdw9y_M5FRKyFr_X8cX6Wxhwh0vAzcdw2E/s400/16.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505617023745331330&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx2wfysDjV-Hehe2fXmav8EjXwkzRt-_VtxCTt-5UmwgVg6Oq5FHFjkKIYOiskYXiczk967N8wsXtftB3E92cOAAyautRE5b_A-pfPjZpSbAzi1JaKvwCRA6CZK_V3FpFpHSySk4netuQ/s1600/16.jpg&quot;&gt;&lt;/a&gt;&lt;center&gt;圖十三&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;9.&lt;/h3&gt;加入後，會跳出一視窗，有三種報表格式，「使用報表精靈」、「使用空白報表」、「從現存報表」，在這裡，要使用「空白報表」（如圖十四），因為「報表精靈」格式很固定且設定又多，所以我不喜歡用。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir9WP-L9EpvimJlOMOdrCOpD-viC3ZOoUqZgW1IC9OAQ3enlpLE9oRW1VShyW27vTXH9ZLpVB-7YB45xKuwIwfQ2r2kmKRFXlCBChOs-pcYeWD8QI8xnsIUFx6CbF5VvztywdiLyrOKuw/s1600/17.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 254px; height: 320px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir9WP-L9EpvimJlOMOdrCOpD-viC3ZOoUqZgW1IC9OAQ3enlpLE9oRW1VShyW27vTXH9ZLpVB-7YB45xKuwIwfQ2r2kmKRFXlCBChOs-pcYeWD8QI8xnsIUFx6CbF5VvztywdiLyrOKuw/s320/17.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505595050864412402&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖十四&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;10.&lt;/h3&gt;設定完成報表格式，在「欄位總管」中對「資料庫欄位」點擊右鍵選擇「資料庫專家」（如圖十五）。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgMzaEN1yg4iBk7z0MoeWwX00M5xEdXpgDmBWiGTATuIGYdyReThnt39JGK8Op02gBcyOySifbbuIjC2gb5oLz5e-7kZOlFHxxdGSEOErF4MOKLPEwJqIJ3JYVMT9BWemaqqOvMT6JhNs/s1600/19.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 281px; height: 230px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgMzaEN1yg4iBk7z0MoeWwX00M5xEdXpgDmBWiGTATuIGYdyReThnt39JGK8Op02gBcyOySifbbuIjC2gb5oLz5e-7kZOlFHxxdGSEOErF4MOKLPEwJqIJ3JYVMT9BWemaqqOvMT6JhNs/s320/19.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505595050232818466&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖十五&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;11.&lt;/h3&gt;此步驟是設定報表的欄位，也是要小心謹慎點，照圖（如圖十六）的 1 處為選擇「目前的連接」資料集，點擊 2 處，即可將資料加入 3 處，之後按下確定。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAT-DwXO7dopWL5X33o9e-foYMZUnu51M32-CFHSUPNNKrByd763CB_geZM9c6Z567FN9X-ZsmazXP7p4BLJ5yds7FC3DLy6Y2G-h9uHSMbjJo5mOI-h76gGhflz9eId9SfyD618nMds4/s1600/18.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 257px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAT-DwXO7dopWL5X33o9e-foYMZUnu51M32-CFHSUPNNKrByd763CB_geZM9c6Z567FN9X-ZsmazXP7p4BLJ5yds7FC3DLy6Y2G-h9uHSMbjJo5mOI-h76gGhflz9eId9SfyD618nMds4/s320/18.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505595057360107202&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖十六&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;12.&lt;/h3&gt;回到「欄位總管」中，就會發現多了一個資料表，並且有資料表中的欄位（如圖十七）。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVH3AEwg_YWZLdVXLg3quFCaIWaw3q37iDSfNN2HtAriPFtpyLjeDcr5PSDkcadmN-7WQmIQNEquDELMu004IECvOfWm3T74YBw4_I0YwY9EZO3h-7jOojzXwdo7inJIJHE1gI0K9-Amk/s1600/20.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 237px; height: 110px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVH3AEwg_YWZLdVXLg3quFCaIWaw3q37iDSfNN2HtAriPFtpyLjeDcr5PSDkcadmN-7WQmIQNEquDELMu004IECvOfWm3T74YBw4_I0YwY9EZO3h-7jOojzXwdo7inJIJHE1gI0K9-Amk/s320/20.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505605463372967026&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖十七&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;13.&lt;/h3&gt;在 Crystal Report 的工具箱，有三個不同的控制項，「Text Object」可以在報表加上固定的文字、「Line Object」可以在報表加上線條、「Box Object」可以在報表加上框線（如圖十八）。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvUrL5fVDJXXP-tyEs8cQN8vc1UE-XW9blEuIypJnlPQFTc9mmGpCfhGSGKWVjMac8lbY7Eh2oc6v4tTUqXT8iqRRqvcJDwl8yehEvp7907CjccuX9T0_GCG_7y-VTt0NTZIe1I49n7oA/s1600/21.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 227px; height: 124px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvUrL5fVDJXXP-tyEs8cQN8vc1UE-XW9blEuIypJnlPQFTc9mmGpCfhGSGKWVjMac8lbY7Eh2oc6v4tTUqXT8iqRRqvcJDwl8yehEvp7907CjccuX9T0_GCG_7y-VTt0NTZIe1I49n7oA/s320/21.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505602719198137330&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖十八&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;14.&lt;/h3&gt;開始設計報表格式，可以將欄位總管的資料庫欄位拉進報表，報表分五區，「報表首」為報表前出現此區塊內容、「頁首」為每頁首前出現此區塊內容、「細目」為資料表的內容、「報表尾」為報表後出現此區塊內容、「頁尾」為每頁後出現此區塊內容（如圖十九）。以下只是隨手設計，如有雷同，那就雷同。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEVj2GXZZfMOo5CaYteYR6K8BDSXvT3y7io_nkEgteerAMPulCeuLfFri9hO3p_bi9DfJHn8GDBvdGRS1WctVy0pGov_fKBRSuycGMrmHt4yaXbQRWjRX_raFV3EosM0h5GDMSnSWCNUo/s1600/22.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 109px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEVj2GXZZfMOo5CaYteYR6K8BDSXvT3y7io_nkEgteerAMPulCeuLfFri9hO3p_bi9DfJHn8GDBvdGRS1WctVy0pGov_fKBRSuycGMrmHt4yaXbQRWjRX_raFV3EosM0h5GDMSnSWCNUo/s320/22.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505602722285256162&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖十九&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;15.&lt;/h3&gt;最後在(*.cs)檔案寫程式匯入資料內容，此處也需要特別注意欄位的對應（如圖二十）。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOUY5iSFiKeL4VJPjFD1t7M0TfcUO6UyRdTSofNWUWEZknbyWowMm52BrOc2w6xPIRnWHGtEY5JUgCxzA8Q8qNVLhXK_sVxTXLw_YoP4f7NRw8z_MDzEY3Iua0j39Px4NxFvKsC_4oZ5I/s1600/23.jpg&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;center&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgF8EXq2hW6yaUfQ90m0T_zogvNA1ivQ2kybaH8OZ8EVxTZDnt3elaDevU5NXk5orMn3GgzzYCIBLtFrptVJqMfnVUV_UNy74QP3Nb1jOKPWpqfYGGUgUiczwn5YWzIqjJq4DBMwucGRtM/s1600/23.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 387px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgF8EXq2hW6yaUfQ90m0T_zogvNA1ivQ2kybaH8OZ8EVxTZDnt3elaDevU5NXk5orMn3GgzzYCIBLtFrptVJqMfnVUV_UNy74QP3Nb1jOKPWpqfYGGUgUiczwn5YWzIqjJq4DBMwucGRtM/s400/23.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505617231115177122&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;圖二十&lt;/center&gt;&lt;h3 style=&quot;color: black;&quot;&gt;16.&lt;/h3&gt;最後，執行此網站，就可以看到如圖（如圖二十一）所示，可以看到區域的對應，也就是說，可以利用這些區域來配置更漂亮的報表。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD3mXxLOTzgtED2keJSaLEtzKw9T1mN8LJvNKFsXKnPYdiMayPoDfGoe8BEnripUko4h077rtYeaj-31ctA_3m4flR-2F3NnG_z1EyHNpw4TVIR8xkysUtAN9PGQnYG1XUVPxge0s0pck/s1600/24.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 284px; height: 320px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD3mXxLOTzgtED2keJSaLEtzKw9T1mN8LJvNKFsXKnPYdiMayPoDfGoe8BEnripUko4h077rtYeaj-31ctA_3m4flR-2F3NnG_z1EyHNpw4TVIR8xkysUtAN9PGQnYG1XUVPxge0s0pck/s320/24.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5505602732779706178&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;center&gt;圖二十一&lt;/center&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/2398768602608112847/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/2398768602608112847' title='9 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/2398768602608112847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/2398768602608112847'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/08/crystal-report_15.html' title='Crystal Report 基本使用'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaYMVbcitXv29M7wxs0W0NNbvWBzFVjJQaKalQIex_dTRaPi4u2BGeJbZ8N9MD1L6JrhSzDz8yz8XhxaZGCWpONOd0c03gco16DGkZfm7dQ2F3rVsu2etlu9_KsJ-cRImKFXIF0lrJ4js/s72-c/1.jpg" height="72" width="72"/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-8361383099280393145</id><published>2010-08-15T12:49:00.010+08:00</published><updated>2010-09-02T00:22:41.237+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Crystal Report 教學"/><title type='text'>Crystal Report 教學</title><content type='html'>&lt;span style=&quot;font-weight: bold; font-family: Courier New;&quot;&gt;Crystal Report 教學目錄&lt;/span&gt;&lt;br /&gt;&lt;ol style=&quot;font-family: Courier New;&quot;&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;http://using-c.blogspot.com/2010/08/crystal-report_15.html&quot;&gt;Crystal Report 基本使用&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;http://using-c.blogspot.com/2010/08/crystal-report_20.html&quot;&gt;Crystal Report 群組&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;http://using-c.blogspot.com/2010/09/crystal-report.html&quot;&gt;Crystal Report 公式&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;http://using-c.blogspot.com/2010/09/crystal-report_01.html&quot;&gt;Crystal Report 參數&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Crystal Report 子報表&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/8361383099280393145/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/8361383099280393145' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/8361383099280393145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/8361383099280393145'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/08/crystal-report.html' title='Crystal Report 教學'/><author><name>liangk</name><uri>http://www.blogger.com/profile/00204918809081610386</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://photos1.blogger.com/x/blogger2/8146/31423219241021/150/z/417348/gse_multipart41078.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-492266765378800133</id><published>2010-07-11T22:13:00.003+08:00</published><updated>2010-07-11T22:24:10.385+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 11805 Bafana Bafana，傳球</title><content type='html'>輸入 N K P 三整數，代表有球員 1 - N，而球員圍成一圈，球員 2 在球員 1 的右邊，球員 3 在球員 2 的右邊，...以此類推。從球員 K 發球，每次傳球只往右邊一個球員傳，傳 P 次。問你最後球會在哪一個球員腳上。&lt;br /&gt;&lt;br /&gt;此題讀入三整數後，利用以下 C 語言程式碼即可解：&lt;pre style=&quot;font-family: Courier New; background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;j = (K + P) % N;&lt;br /&gt;if (j == 0) j = N;&lt;/pre&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://acm.uva.es/p/v118/11805.html&quot;&gt;p11805題目連結&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/492266765378800133/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/492266765378800133' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/492266765378800133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/492266765378800133'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/07/problem-11805-bafana-bafana.html' title='Problem 11805 Bafana Bafana，傳球'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-1836306083757128858</id><published>2010-07-11T14:20:00.003+08:00</published><updated>2010-07-11T21:15:40.996+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 10405 Longest Common Subsequence，最長共同子字串</title><content type='html'>建議大家可以上網去找「最長共同子字串」的演算法，此演算法是由「最長連續共同子字串」推演而來。「最長共同子字串」的方法就是依序比對字串，將最佳比對結果逐一往陣列右下方推，推到最後，答案就出來了。&lt;br /&gt;C 語言程式碼如下：&lt;pre style=&quot;font-family: Courier New; overflow: scroll; height: 160px; background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;#define LEN 1000&lt;br /&gt;&lt;br /&gt;char seq1[LEN + 1], seq2[LEN + 1];&lt;br /&gt;&lt;br /&gt;int lcs_length(int s1Len, int s2Len) &lt;br /&gt;{&lt;br /&gt;    int i, j;&lt;br /&gt;    int table[s1Len + 1][s2Len + 1];&lt;br /&gt;    memset(table, 0, sizeof(table));&lt;br /&gt; &lt;br /&gt;    for(i = 1; i &lt;= s1Len; ++i) {&lt;br /&gt;        for(j = 1; j &lt;= s2Len; ++j) {&lt;br /&gt;            if(seq1[i - 1] == seq2[j - 1])&lt;br /&gt;                table[i][j] = table[i - 1][j - 1] + 1;&lt;br /&gt;            else if(table[i - 1][j] &gt; table[i][j - 1])&lt;br /&gt;                table[i][j] = table[i - 1][j];&lt;br /&gt;            else&lt;br /&gt;                table[i][j] = table[i][j - 1];&lt;br /&gt;        }&lt;br /&gt;   }&lt;br /&gt;   return table[s1Len][s2Len];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;    &lt;br /&gt;    while (gets(seq1))&lt;br /&gt;    {&lt;br /&gt;        gets(seq2);  &lt;br /&gt;        int s1Len = strlen(seq1), s2Len = strlen(seq2);&lt;br /&gt;        printf(&quot;%d\n&quot;, lcs_length(s1Len, s2Len));&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    return 0;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://acm.uva.es/p/v104/10405.html&quot;&gt;p10405題目連結&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/1836306083757128858/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/1836306083757128858' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/1836306083757128858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/1836306083757128858'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/07/problem-10405-longest-common.html' title='Problem 10405 Longest Common Subsequence，最長共同子字串'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-7080874030845724802</id><published>2010-07-11T13:52:00.002+08:00</published><updated>2010-07-11T14:19:00.747+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 10409 Die Game，骰子遊戲</title><content type='html'>首先宣告一結構，紀錄骰子上下東西南北所屬數字為何：&lt;pre style=&quot;font-family: Courier New; background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;struct Dice&lt;br /&gt;{&lt;br /&gt;    int up, down, north, east, south, west;&lt;br /&gt;};&lt;br /&gt;struct Dice d;&lt;/pre&gt;主程式內，讀入翻動次數 n 次後，先初始化骰子數字各在哪些方位：&lt;pre style=&quot;font-family: Courier New; background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;d.up = 1, d.down = 6, d.north = 2,&lt;br /&gt;d.east = 4, d.south = 5, d.west = 3;&lt;/pre&gt;最後只要依照相對面的骰子總和為 7 以及空間概念，就可寫出來：&lt;pre style=&quot;font-family: Courier New; overflow: scroll; height: 160px; background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;while (n --)&lt;br /&gt;{&lt;br /&gt;    scanf(&quot;%s&quot;, str);  &lt;br /&gt;    if (str[0] == &#39;s&#39;) /* 南 */&lt;br /&gt;        d.south = d.up, d.up = d.north, &lt;br /&gt;        d.down = 7 - d.up, d.north = 7 - d.south;&lt;br /&gt;    if (str[0] == &#39;n&#39;) /* 北 */&lt;br /&gt;        d.down = d.north, d.north = d.up,&lt;br /&gt;        d.up = 7 - d.down, d.south = 7 - d.north;&lt;br /&gt;    if (str[0] == &#39;w&#39;)&lt;br /&gt;        d.down = d.west, d.west = d.up,&lt;br /&gt;        d.up = 7 - d.down, d.east = 7 - d.west;&lt;br /&gt;    if (str[0] == &#39;e&#39;)&lt;br /&gt;        d.east = d.up, d.up = d.west,&lt;br /&gt;        d.down = 7 - d.up, d.west = 7 - d.east;&lt;br /&gt;}&lt;br /&gt;printf(&quot;%d\n&quot;, d.up);&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://acm.uva.es/p/v104/10409.html&quot;&gt;p10409題目連結&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/7080874030845724802/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/7080874030845724802' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/7080874030845724802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/7080874030845724802'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/07/problem-10409-die-game.html' title='Problem 10409 Die Game，骰子遊戲'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-8232829063368740480</id><published>2010-07-11T12:55:00.002+08:00</published><updated>2010-07-11T13:29:13.783+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 10452 Marcus</title><content type='html'>給你一陣列，要你求出從字元 &#39;@&#39;( 一定在最後一排 )到字元 &#39;#&#39;( 一定在第一排 )，按照字串 &quot;IEHOVA&quot; 走法，列出怎麼走才會走的到字元 &#39;#&#39; 的走法。&lt;br /&gt;&lt;br /&gt;所以先寫好一字串，讓它走一步可以比對索引字元，若不對，則不走；若走到，則印出。用一遞迴函式實現，i, j 為目前位置，index 為目前字串索引：&lt;pre style=&quot;font-family: Courier New; overflow: scroll; height: 160px; background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;#define SIZE 8&lt;br /&gt;#define LEN 7&lt;br /&gt;int n, row, col, sI, sJ, eI, eJ;&lt;br /&gt;&lt;br /&gt;char letters[LEN + 1] = {&#39;@&#39;, &#39;I&#39;, &#39;E&#39;, &#39;H&#39;, &#39;O&#39;, &#39;V&#39;, &#39;A&#39;, &#39;#&#39;};&lt;br /&gt;char path[LEN];&lt;br /&gt;char stone[SIZE][SIZE + 1];&lt;br /&gt;void visit(int i, int j, int index)&lt;br /&gt;{&lt;br /&gt;    if (letters[index] != stone[i][j]) return;&lt;br /&gt;    if (i == eI &amp;&amp; j == eJ)&lt;br /&gt;    {&lt;br /&gt;        int k;&lt;br /&gt;        &lt;br /&gt;        if (path[0] == &#39;r&#39;) printf(&quot;right&quot;);&lt;br /&gt;        else if (path[0] == &#39;l&#39;) printf(&quot;left&quot;);&lt;br /&gt;        else if (path[0] == &#39;f&#39;) printf(&quot;forth&quot;);&lt;br /&gt;        &lt;br /&gt;        for (k = 1; k &lt; LEN; k ++)&lt;br /&gt;        {&lt;br /&gt;            if (path[k] == &#39;r&#39;) printf(&quot; right&quot;);&lt;br /&gt;            else if (path[k] == &#39;l&#39;) printf(&quot; left&quot;);&lt;br /&gt;            else if (path[k] == &#39;f&#39;) printf(&quot; forth&quot;);&lt;br /&gt;        }&lt;br /&gt;        printf(&quot;\n&quot;);&lt;br /&gt;    }&lt;br /&gt;    /* 左 */&lt;br /&gt;    if (j - 1 &gt;= 0) path[index] = &#39;l&#39;, visit(i, j - 1, index + 1);&lt;br /&gt;    /* 右 */&lt;br /&gt;    if (j + 1 &lt; col) path[index] = &#39;r&#39;, visit(i, j + 1, index + 1);&lt;br /&gt;    /* 前 */&lt;br /&gt;    if (i - 1 &gt;= 0) path[index] = &#39;f&#39;, visit(i - 1, j, index + 1);&lt;br /&gt;}&lt;/pre&gt;最後，在主程式如此呼叫：&lt;pre style=&quot;font-family: Courier New; overflow: scroll; height: 160px; background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;scanf(&quot;%d %d&quot;, &amp;row, &amp;col);  &lt;br /&gt;for (i = 0; i &lt; row; i ++)&lt;br /&gt;{&lt;br /&gt;    scanf(&quot;%s&quot;, stone[i]);&lt;br /&gt;    if (i == 0)&lt;br /&gt;    { &lt;br /&gt;        for (j = 0; j &lt; col; j ++)&lt;br /&gt;            if (stone[i][j] == &#39;#&#39;) eI = i, eJ = j;&lt;br /&gt;    }&lt;br /&gt;    if (i == row - 1)&lt;br /&gt;    {&lt;br /&gt;        for (j = 0; j &lt; col; j ++)&lt;br /&gt;            if (stone[i][j] == &#39;@&#39;) sI = i, sJ = j;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;visit(sI, sJ, 0);&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://acm.uva.es/p/v104/10452.html&quot;&gt;p10452題目連結&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/8232829063368740480/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/8232829063368740480' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/8232829063368740480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/8232829063368740480'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/07/problem-10452-marcus.html' title='Problem 10452 Marcus'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-4699662233001840291</id><published>2010-07-11T12:26:00.003+08:00</published><updated>2010-07-11T12:50:51.393+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 10494 If We Were a Child Again，小學數學</title><content type='html'>此題要算出他給你的運算式。用 scanf(&quot;%s %s %lld&quot;, m, ch, &amp;n) 讀入，第一個數可能會很大，所以利用字串讀入，讀入之後，利用我們平常小學算數的方法，將被除數一個一個從大位數到小位數的讀入，再用 n 去除或取餘數，除法就每次除每次印；餘數就最後在印就好了：&lt;pre style=&quot;font-family: Courier New; overflow: scroll; height: 160px; background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;first = 1;  &lt;br /&gt;if (ch[0] == &#39;/&#39;)&lt;br /&gt;{&lt;br /&gt;    tmp = 0;&lt;br /&gt;    for (i = 0; (c = m[i]); i ++)&lt;br /&gt;    {&lt;br /&gt;        tmp *= b;&lt;br /&gt;        tmp += c - &#39;0&#39;;&lt;br /&gt;        j = tmp / n;&lt;br /&gt;        if (j != 0) first = 0;&lt;br /&gt;        if (!first) printf(&quot;%lld&quot;, j);&lt;br /&gt;        tmp %= n;&lt;br /&gt;    }&lt;br /&gt;    if (first) printf(&quot;0&quot;);&lt;br /&gt;    printf(&quot;\n&quot;);&lt;br /&gt;}&lt;br /&gt;if (ch[0] == &#39;%&#39;)&lt;br /&gt;{&lt;br /&gt;    for (i = 0, tmp = 0; (c = m[i]); i ++)&lt;br /&gt;    {&lt;br /&gt;        tmp *= b;&lt;br /&gt;        tmp += c - &#39;0&#39;;&lt;br /&gt;        tmp %= n;&lt;br /&gt;    }&lt;br /&gt;    printf(&quot;%lld\n&quot;, tmp);&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://acm.uva.es/p/v104/10494.html&quot;&gt;p10494題目連結&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/4699662233001840291/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/4699662233001840291' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/4699662233001840291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/4699662233001840291'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/07/problem-10494-if-we-were-child-again.html' title='Problem 10494 If We Were a Child Again，小學數學'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-5592421995119872017</id><published>2010-07-11T11:59:00.002+08:00</published><updated>2010-07-11T12:19:23.827+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 10497 Sweet Child Makes Trouble，麻煩的小孩</title><content type='html'>通常可愛的小孩會製造一些麻煩，例如說拿別人的東西總是不會歸回原位放好，如果拿了 3 個人的東西，而不歸回原位放好的擺法有 2 個，2 3 1 和 3 1 2。所以給你一個 n 值就是小孩拿了 n 樣東西，要你求出不歸回原位的擺法有幾種。&lt;br /&gt;&lt;br /&gt;此處要用到大數概念，最長位數有 1976 位這麼長，所以處理起來頗為耗時，不過也只需處理一次並且記錄在字元陣列內，最後用 puts() 印出即可：&lt;pre style=&quot;font-family: Courier New; overflow: scroll; height: 160px; background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;#define SIZE 800&lt;br /&gt;#define LEN 2000&lt;br /&gt;int p[SIZE + 1][LEN + 1] = {0};&lt;br /&gt;char output[SIZE + 1][LEN + 1];&lt;br /&gt;void create()&lt;br /&gt;{&lt;br /&gt;    int i; &lt;br /&gt;    p[0][0] = 1;&lt;br /&gt;    p[1][0] = 0;&lt;br /&gt;    output[0][0] = &#39;1&#39;;&lt;br /&gt;    output[0][1] = &#39;\0&#39;;&lt;br /&gt;    output[1][0] = &#39;0&#39;;&lt;br /&gt;    output[1][1] = &#39;\0&#39;;&lt;br /&gt;    int j, k, s, count = 0;&lt;br /&gt;    for (i = 2; i &lt;= SIZE; i ++)&lt;br /&gt;    {&lt;br /&gt;        for (j = 0; j &lt;= LEN; j ++)&lt;br /&gt;        {&lt;br /&gt;            p[i][j] += (p[i - 1][j] + p[i - 2][j]) * (i - 1);&lt;br /&gt;            p[i][j + 1] += p[i][j] / 10, p[i][j] %= 10;&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        for (j = LEN; j &gt;= 0; j --)&lt;br /&gt;            if (p[i][j] &gt; 0) break;&lt;br /&gt;        for (k = j, s = 0; k &gt;= 0; k --, s ++)&lt;br /&gt;            output[i][s] = p[i][k] + &#39;0&#39;;&lt;br /&gt;        output[i][s] = &#39;\0&#39;; &lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;    int n;&lt;br /&gt;    create();&lt;br /&gt;    while (scanf(&quot;%d&quot;, &amp;n) == 1 &amp;&amp; n != -1)&lt;br /&gt;        puts(output[n]);&lt;br /&gt;    return 0;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://acm.uva.es/p/v104/10497.html&quot;&gt;p10497題目連結&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/5592421995119872017/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/5592421995119872017' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/5592421995119872017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/5592421995119872017'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/07/problem-10497-sweet-child-makes-trouble.html' title='Problem 10497 Sweet Child Makes Trouble，麻煩的小孩'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-232060945496427140</id><published>2010-07-05T12:01:00.003+08:00</published><updated>2010-07-05T14:46:41.961+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 10432 Polygon Inside A Circle</title><content type='html'>給你圓的半徑 r 與內接 n 邊形的邊數量，要你求出 n 邊形面積多少。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjHAL5cNCtYWw2VZ6hJ1mIIHvigA34SREgNgvYjsXIfWVkQ861X7YiTbChFAirT1PCeI0DYNVvsuhKk78jHDpEoH7IseDdWMLItlfW771TKeeq7vL2gIV7NXZWH7AgspnUwxzc7kWZs4E/s1600/p10432.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 318px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjHAL5cNCtYWw2VZ6hJ1mIIHvigA34SREgNgvYjsXIfWVkQ861X7YiTbChFAirT1PCeI0DYNVvsuhKk78jHDpEoH7IseDdWMLItlfW771TKeeq7vL2gIV7NXZWH7AgspnUwxzc7kWZs4E/s320/p10432.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5490272039229075650&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;以上為 n = 8 的表示方式。&lt;br /&gt;推導公式，要求橘色邊和綠色邊方能求出 n 邊形之一塊三角形面積，所以 θ 角要先求出，2 * PI 為一個圓周率，所以 θ = 2 * PI / n。&lt;br /&gt;所以，取 θ 角的一半，橘色邊為 r * cos(PI / n)，&lt;br /&gt;綠色邊為 2 * r * sin(PI / n)，&lt;br /&gt;面積為 r * cos(PI / n) * 2 * r * sin(PI / n) / 2，&lt;br /&gt;約分後為 r * r * cos(PI / n) * sin(PI / n) = r * r * sin(2 * PI / n) / 2。  &lt;br /&gt;(依照公式 sin2θ = 2sinθcosθ)&lt;br /&gt;而有 n 塊三角形所以 n 邊形總面積為 n * r * r * sin(2 * PI / n) / 2。&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://acm.uva.es/p/v104/10432.html&quot;&gt;p10432題目連結&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/232060945496427140/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/232060945496427140' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/232060945496427140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/232060945496427140'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/07/problem-10432-polygon-inside-circle.html' title='Problem 10432 Polygon Inside A Circle'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjHAL5cNCtYWw2VZ6hJ1mIIHvigA34SREgNgvYjsXIfWVkQ861X7YiTbChFAirT1PCeI0DYNVvsuhKk78jHDpEoH7IseDdWMLItlfW771TKeeq7vL2gIV7NXZWH7AgspnUwxzc7kWZs4E/s72-c/p10432.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-7540291609444258786</id><published>2010-07-04T18:48:00.011+08:00</published><updated>2010-07-05T11:27:57.121+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 10491 Cows and Cars，牛與車</title><content type='html'>此題為機率題，找出其中公式就可解此題。舉幾個例子：&lt;br /&gt;&lt;table style=&quot;&quot; align=&quot;center&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;牛數量&lt;/td&gt;&lt;td&gt;車數量&lt;/td&gt;&lt;td&gt;開門數&lt;/td&gt;&lt;td&gt;門總數&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;以上資料來看，&lt;br /&gt;先選牛的機率 2 / 3，換選車機率 1 / 1 (因為會開一個門是牛的門，規定又說一定要換門)，所以機率 2 / 3 * 1 = 2 / 3。&lt;br /&gt;先選車機率 1 / 3，換選車機率 0 / 1 (一開始選車，再開一個是牛的門，規定一定要換門)，所以機率 1 / 3 * 0 = 0。&lt;br /&gt;一定要換門的機率為 2 / 3 + 0 = 2 / 3。&lt;br /&gt;&lt;table align=&quot;center&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;牛數量&lt;/td&gt;&lt;td&gt;車數量&lt;/td&gt;&lt;td&gt;開門數&lt;/td&gt;&lt;td&gt;門總數&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;先選牛的機率 5 / 8，換選車機率 3 / 5，所以機率 5 / 8 * 3 / 5 = 15 / 40。&lt;br /&gt;先選車機率 3 / 8，換選車機率 2 / 5 ，所以機率 3 / 8 * 2 / 5 = 6 / 40。&lt;br /&gt;一定要換門的機率為 15 / 40 + 6 / 40 = 21 / 40。&lt;br /&gt;最後推導公式：&lt;table align=&quot;center&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;牛數量&lt;/td&gt;&lt;td&gt;車數量&lt;/td&gt;&lt;td&gt;開門數&lt;/td&gt;&lt;td&gt;門總數&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;NCOWS&lt;/td&gt;&lt;td&gt;NCARS&lt;/td&gt;&lt;td&gt;NSHOW&lt;/td&gt;&lt;td&gt;DOORS (= NCOWS + NCARS)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;先選牛的機率 NCOWS / DOORS，換選車機率 NCARS / (DOORS - NSHOW - 1)，所以機率 NCOWS * NCARS / (DOORS * (DOORS - NSHOW - 1))。&lt;br /&gt;先選車機率 NCARS / DOORS，換選車機率 (NCARS - 1) / (DOORS - NSHOW - 1)，所以機率 NCARS * (NCARS - 1) / (DOORS * (DOORS - NSHOW - 1))。&lt;br /&gt;一定要換門的機率為 (NCOWS + NCARS - 1) * NCARS / (DOORS * (DOORS - NSHOW - 1))。&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://acm.uva.es/p/v104/10491.html&quot;&gt;p10491題目連結&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/7540291609444258786/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/7540291609444258786' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/7540291609444258786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/7540291609444258786'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/07/problem-10491-cows-and-cars.html' title='Problem 10491 Cows and Cars，牛與車'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-7497642150082746007</id><published>2010-07-03T12:40:00.002+08:00</published><updated>2010-07-03T13:44:13.131+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 10551 Basic Remains，進位餘數</title><content type='html'>此題給你三個數，一是進位制，二是被除數，三是除數。要你求出在此進位制的餘數為何。&lt;br /&gt;&lt;br /&gt;首先將於除轉為 10 進制，讀入數值後，用一函式轉換：&lt;pre style=&quot;font-family: Courier New; overflow: scroll; height: 160px; background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;#define SIZE 1000&lt;br /&gt;char p[SIZE + 1], m[10], print[SIZE + 1];&lt;br /&gt;int b, r;&lt;br /&gt;&lt;br /&gt;int get10Basic()&lt;br /&gt;{&lt;br /&gt;    int n = 0, i;&lt;br /&gt;    int len = strlen(m);&lt;br /&gt;    for (i = 0; i &lt; len; i ++)&lt;br /&gt;        n = n * b + (m[i] - &#39;0&#39;);&lt;br /&gt;    return n;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;主程式內 ....&lt;br /&gt;scanf(&quot;%s %s&quot;, p, m);&lt;br /&gt;int len = strlen(p);&lt;br /&gt;int i;&lt;br /&gt;r = get10Basic();&lt;/pre&gt;最後只需將被除數從大到小一個一個讀入，每次讀入都要乘上進位制，再去和 r 取餘數，最後要轉回進位制印出。&lt;pre style=&quot;font-family: Courier New; background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;int n = 0;&lt;br /&gt;for (i = 0; i &lt; len; i ++)&lt;br /&gt;{&lt;br /&gt;    n *= b;&lt;br /&gt;    n += p[i] - &#39;0&#39;;&lt;br /&gt;    n %= r;&lt;br /&gt;}&lt;br /&gt;printbBasic(n);&lt;/pre&gt; printbBasic 函式程式碼：&lt;pre style=&quot;font-family: Courier New;background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;void printbBasic(int n)&lt;br /&gt;{&lt;br /&gt;    int i = 0, j;&lt;br /&gt;    for ( ; n; n /= b)&lt;br /&gt;        print[i ++] = n % b;&lt;br /&gt;    if (i == 0) printf(&quot;0&quot;);    &lt;br /&gt;    for (j = i - 1; j &gt;= 0; j --)&lt;br /&gt;        printf(&quot;%c&quot;, print[j] + &#39;0&#39;);&lt;br /&gt;    printf(&quot;\n&quot;);&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://acm.uva.es/p/v105/10551.html&quot;&gt;p10551題目連結&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/7497642150082746007/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/7497642150082746007' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/7497642150082746007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/7497642150082746007'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/07/problem-10551-basic-remains.html' title='Problem 10551 Basic Remains，進位餘數'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-2359130925122689751</id><published>2010-07-03T12:14:00.003+08:00</published><updated>2010-07-03T12:37:09.657+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 10573 Geometry Paradox，面積</title><content type='html'>這題要求出下圖灰色部分的面積。&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwJfkdVEro1UQEjZWZJ7MM9eZkbGbuYeNKdXwuxaRe3NqajFf6LFJsOwLf1_nzNCVr1fZDS8G9Gog4-b_o31ogszyDlKQ9LQqhhbGtgVPG22j-KvA9jd-4jC1HC_kLfUFfy-mQo5Ds3GI/s1600/p10573.jpg&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 254px; height: 246px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwJfkdVEro1UQEjZWZJ7MM9eZkbGbuYeNKdXwuxaRe3NqajFf6LFJsOwLf1_nzNCVr1fZDS8G9Gog4-b_o31ogszyDlKQ9LQqhhbGtgVPG22j-KvA9jd-4jC1HC_kLfUFfy-mQo5Ds3GI/s320/p10573.jpg&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5489529256356889842&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;這題如果給你 r1, r2 半徑，那就很好算出灰色部分面積。&lt;br /&gt;依照公式： ((r1 + r2) * (r1 + r2) - r1 * r1 - r2 * r2) * PI。&lt;br /&gt;如果只給你 t，要假設 r1 = r2，則 t 就為直徑，則 t / 4 則為兩圓半徑，&lt;br /&gt;則白色部分面積為： 2 * (t / 4 * t / 4 * PI) = t * t / 8 * PI。&lt;br /&gt;而灰色部分則是 (t / 2 * t / 2 * PI) - t * t / 8 * PI = t * t / 8 * PI。&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://acm.uva.es/p/v105/10573.html&quot;&gt;p10573題目連結&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/2359130925122689751/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/2359130925122689751' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/2359130925122689751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/2359130925122689751'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/07/problem-10573-geometry-paradox.html' title='Problem 10573 Geometry Paradox，面積'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwJfkdVEro1UQEjZWZJ7MM9eZkbGbuYeNKdXwuxaRe3NqajFf6LFJsOwLf1_nzNCVr1fZDS8G9Gog4-b_o31ogszyDlKQ9LQqhhbGtgVPG22j-KvA9jd-4jC1HC_kLfUFfy-mQo5Ds3GI/s72-c/p10573.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-1493051483878955075</id><published>2010-07-03T11:43:00.003+08:00</published><updated>2010-07-03T11:46:26.791+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 10583 Ubiquitous Religions，最大宗教群</title><content type='html'>此題與 Problem &lt;a href=&quot;http://using-c.blogspot.com/2010/07/problem-10608-friends.html&quot;&gt;10608&lt;/a&gt; Friends 是一樣的，不過數量更大，建議可以使用輸入優化來縮短時間，但還是跑了一秒多，說明可點上面連結去看。&lt;br /&gt;&lt;br /&gt;以下還是提供 C 語言程式碼：&lt;pre style=&quot;font-family: Courier New; overflow: scroll; height: 160px; background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;int n, m;&lt;br /&gt;&lt;br /&gt;int getInt()&lt;br /&gt;{&lt;br /&gt;    char ch;&lt;br /&gt;    int n = 0;&lt;br /&gt;    while( ch = getchar())&lt;br /&gt;        if(ch != &#39; &#39; &amp;&amp; ch != &#39;\n&#39;) break;&lt;br /&gt;    n = ch - 48;&lt;br /&gt;    while( ch = getchar())&lt;br /&gt;    {&lt;br /&gt;        if(ch == &#39; &#39; || ch == &#39;\n&#39;) break;&lt;br /&gt;        n = n * 10 + ch - 48;&lt;br /&gt;    }&lt;br /&gt;    return n;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;主程式內 ....&lt;br /&gt;while ((n = getInt()) &amp;&amp; (m = getInt()))&lt;br /&gt;{&lt;br /&gt;    int student[n + 1];&lt;br /&gt;    religionID = 1, count = 0;&lt;br /&gt;    memset(student, 0, sizeof(student));&lt;br /&gt;    while (m --)&lt;br /&gt;    {&lt;br /&gt;        i = getInt(), j = getInt();&lt;br /&gt;        if (student[i] == 0 &amp;&amp; student[j] == 0)&lt;br /&gt;        {&lt;br /&gt;            student[i] = religionID, student[j] = religionID;&lt;br /&gt;            religionID ++;&lt;br /&gt;            count ++;&lt;br /&gt;        }&lt;br /&gt;        else if((student[i] != 0 &amp;&amp; student[j] == 0) ||&lt;br /&gt;                (student[i] == 0 &amp;&amp; student[j] != 0))&lt;br /&gt;        {&lt;br /&gt;            tmp = student[i] &lt; student[j] ? student[j] : student[i];&lt;br /&gt;            student[i] = tmp, student[j] = tmp;&lt;br /&gt;        } &lt;br /&gt;        else if (student[i] != student[j])&lt;br /&gt;        {&lt;br /&gt;            tmp = student[j];&lt;br /&gt;            replace = student[i];&lt;br /&gt;            for (s = 1; s &lt;= n; s ++)&lt;br /&gt;                if (student[s] == tmp) student[s] = replace;&lt;br /&gt;            count --;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    /* for (i = 1; i &lt;= n; i ++)&lt;br /&gt;        printf(&quot;%d &quot;, student[i]);&lt;br /&gt;    printf(&quot;\n&quot;); */&lt;br /&gt;    for (i = 1; i &lt;= n; i ++)&lt;br /&gt;        if (student[i] == 0) count ++;&lt;br /&gt;    printf(&quot;Case %d: %d\n&quot;, caseNum ++, count);&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://acm.uva.es/p/v105/10583.html&quot;&gt;p10583題目連結&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/1493051483878955075/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/1493051483878955075' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/1493051483878955075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/1493051483878955075'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/07/problem-10583-ubiquitous-religions.html' title='Problem 10583 Ubiquitous Religions，最大宗教群'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-257419012022452178.post-5048231496480017606</id><published>2010-07-03T00:09:00.004+08:00</published><updated>2010-07-03T02:15:08.500+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ACM 程式設計解題"/><title type='text'>Problem 10608 Friends，最大朋友群</title><content type='html'>鎮上有 N 個人，照一句諺語說：「我朋友們的朋友也是我的朋友」。A 和 B 為朋友，B 和 C 為朋友，所以 C 和 A 也為朋友。&lt;br /&gt;&lt;br /&gt;讀入 N 和 M 兩整數，N 為鎮上有公民 1 - N，而接下來會有 M 列資料，M 列資料都有兩整數 a, b，代表公民 a 和公民 b 為朋友。最後請你算出這鎮上最大朋友群的數量為多少。&lt;br /&gt;&lt;br /&gt;其實只要給朋友群定義一個朋友群編號，如果雙方都沒有朋友群編號，就將兩人都定義一個新的朋友群編號，並將此朋友編號數量變成 2；若兩人其中一人沒有朋友群編號，則將他加入有編號的朋友群之中；如果兩人都有朋友群編號，就將其中一方的所有朋友的編號改為另一方的編號，順便將另一方朋友編號數量累加對方的數量。&lt;br /&gt;&lt;br /&gt;一開始宣告陣列以及初始化朋友群編號以及朋友群數量：&lt;pre style=&quot;font-family: Courier New; background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;scanf(&quot;%d %d&quot;, &amp;n, &amp;m);&lt;br /&gt;int friends[n + 1], record[n + 1], max = 0;&lt;br /&gt;count = 0, groupID = 1;&lt;br /&gt;memset(friends, 0, sizeof(friends));&lt;br /&gt;memset(record, 0, sizeof(record));&lt;/pre&gt;接下來用以上敘述的概念寫成分群並且計算數量的方法，順便記錄最大值，寫成 C 語言程式碼如下：&lt;pre style=&quot;font-family: Courier New; overflow: scroll; height: 160px; background-color: rgb(238, 238, 238); font-size: small;&quot;&gt;while (m --)&lt;br /&gt;{&lt;br /&gt;    scanf(&quot;%d %d&quot;, &amp;a, &amp;b);&lt;br /&gt;    if (friends[a] == 0 &amp;&amp; friends[b] == 0)&lt;br /&gt;    {&lt;br /&gt;        friends[a] = groupID, friends[b] = groupID;&lt;br /&gt;        record[groupID] = 2;&lt;br /&gt;        if (max &lt; record[groupID]) max = record[groupID];&lt;br /&gt;        &lt;br /&gt;        groupID ++;&lt;br /&gt;        count ++;&lt;br /&gt;    }&lt;br /&gt;    else if((friends[a] != 0 &amp;&amp; friends[b] == 0) ||&lt;br /&gt;            (friends[a] == 0 &amp;&amp; friends[b] != 0))&lt;br /&gt;    {&lt;br /&gt;        tmp = friends[a] &lt; friends[b] ? friends[b] : friends[a];&lt;br /&gt;        friends[a] = tmp, friends[b] = tmp;&lt;br /&gt;        record[tmp] ++;&lt;br /&gt;        if (max &lt; record[tmp]) max = record[tmp];&lt;br /&gt;    } &lt;br /&gt;    else if (friends[a] != friends[b])&lt;br /&gt;    {&lt;br /&gt;        tmp = friends[b];&lt;br /&gt;        replace = friends[a];&lt;br /&gt;        record[tmp] = 0;&lt;br /&gt;        for (s = 1; s &lt;= n; s ++)&lt;br /&gt;            if (friends[s] == tmp) friends[s] = replace, record[replace] ++;&lt;br /&gt;        if (max &lt; record[replace]) max = record[replace];&lt;br /&gt;        count --;&lt;br /&gt;    }&lt;br /&gt;    /* for (s = 1; s &lt;= n; s ++)&lt;br /&gt;        printf(&quot;%d &quot;, record[s]);&lt;br /&gt;    printf(&quot;\n&quot;); */&lt;br /&gt;}&lt;br /&gt;printf(&quot;%d\n&quot;, max);&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;By David.K&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://acm.uva.es/p/v106/10608.html&quot;&gt;p10608題目連結&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/2007/09/acm.html&quot;&gt;回ACM題庫目錄&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://using-c.blogspot.com/&quot;&gt;回首頁&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://using-c.blogspot.com/feeds/5048231496480017606/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/257419012022452178/5048231496480017606' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/5048231496480017606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/257419012022452178/posts/default/5048231496480017606'/><link rel='alternate' type='text/html' href='http://using-c.blogspot.com/2010/07/problem-10608-friends.html' title='Problem 10608 Friends，最大朋友群'/><author><name>David Kuo</name><uri>http://www.blogger.com/profile/15431572855600878682</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44HmyawCHL9S3zahF8gDJC2DjGgnFoRZwN3QtQGzJ_S1FHBLRKxXPJh9H1j27P98kuYgrMnXqbgV0s-H_gAvSlqY0bObpKnEkF8NABIu_U8LIbztaPykAqrLk9x-Ie6E/s1600/*'/></author><thr:total>0</thr:total></entry></feed>