NOTICE

 任何跟文章無關的閒聊,請愛用 留言板(Guestbook)

 想要快速瀏覽主題,請點選單 目錄 標籤。

 停止更新ing,請見諒。 <(_ _)>


11月 29, 2008

【解題】Oil Deposits

@
ACM Volume V 572 - Oil Deposits


The Problem

The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that divides the land into numerous square plots. It then analyzes each plot separately, using sensing equipment to determine whether or not the plot contains oil.
展開全文文章收合

11月 27, 2008

【語言】陣列是什麼 - What is Array?

@
  在前幾篇文章中,我們已經介紹過變數了。但是,假設現在出現了這種情況:現在班上有 30 個人,而你想要寫一個程式,記錄班上所有人的期中考成績,並計算出全班總平均。
展開全文文章收合

11月 25, 2008

【語言】控制流程敘述 - Control Flow Statement

@
  對於程式語言而言,敘述通常被認為是一支程式的最小組成單位。例如簡單的指派(assignment) x = 5 或是斷言(assertion) a < b 都屬於一個敘述。
展開全文文章收合

【語言】函式是什麼 - What is Function?

@
  開發程式時,或許在程式很小的情況,把所有功能通通寫在一個同區塊(block)中是一個可行的方法。但是,一旦程式的規模越變越大,若仍舊將所有內容都寫在一個區塊中,將會導致程式變得難以除錯與閱讀。
展開全文文章收合

11月 20, 2008

【演講】The Yahoo! User Interface Library

@
  今天有幸能夠聽到 Yahoo! 科技推廣"傳教士" Joseph Chiang 所帶來的演講,主題是 Yahoo! 自家建立的 YUI(The Yahoo! User Interface Library) 推廣、實作入門與應用實例。
展開全文文章收合

11月 16, 2008

【解題】Box of Bricks

@
ACM Volume V 591 - Box of Bricks


The Problem

Little Bob likes playing with his box of bricks. He puts the bricks one upon another and builds stacks of different height. ``Look, I've built a wall!'', he tells his older sister Alice. ``Nah, you should make all stacks the same height. Then you would have a real wall.'', she retorts. After a little con- sideration, Bob sees that she is right. So he sets out to rearrange the bricks, one by one, such that all stacks are the same height afterwards. But since Bob is lazy he wants to do this with the minimum number of bricks moved. Can you help?
展開全文文章收合

11月 12, 2008

【語言】變數是什麼 - What is Variable?

@
  變數(variable)是什麼?從字面上解釋,變數就是「可變的數」,也就是其值可以隨著時間而改變。假如用更精確的說法來解釋,程式設計上的變數,代表的就是一個擁有名稱的記憶體儲存空間
展開全文文章收合

11月 11, 2008

【演算】快速排序法 - Quicksort

@
快速排序法(quicksort)是目前被認為效率最高的排序演算法(sorting algorithm)。與合併排序法(mergesort)類似,快速排序法也是利用分治法(divide and conquer,D&C),不斷地將資料分成兩部分以解決問題的例子。
展開全文文章收合

11月 07, 2008

【作品】大數運算 - Large Integer

@
  在比完今年(96 年)的資訊學科能力測驗後,有一題因為需要輸出 122 位的整數而無法得分。後來才發現,這種超過變數所能代表的最大整數,稱為超長整數,或通稱為大數運算。
展開全文文章收合

11月 04, 2008

【語言】直譯與編譯 - Interpretation and Compilation

@
  之前,我們提到過高階語言(high-level language)須經由轉換的動作,將原始的程式碼「翻譯」成機器看得懂的二進位機器碼。一般而言,我們可以因這種轉換的動作的不同,將程式語言分為編譯式語言(compiled language)直譯式語言(interpreted language)兩種。
展開全文文章收合

11月 02, 2008

【語言】程式語言簡介 - Introduction of Programming Language

@
  語言(language),時常是人與人之間賴以溝通的橋樑。正如日常生活中,三五好友間的哈拉閒聊、講台上教授的口述講解、或是我現在寫出來的這一篇文章,都是利用語言做為「你」與「我」之間,互相溝通、交流的管道。

展開全文文章收合

11月 01, 2008

【雜記】莫忘初衷

@
  從今年二月申請 blogger 帳號,開了現在這個 blog、三月開始寫文章、貼程式。歷經高三的 TOI、學測、指考,大學的暑假、開學、NCPC。這樣斷斷續續的寫寫停停,直到現在,也已經八個月了。好不容易,終於到達目前的第一百篇(雖然廢話佔了不少篇)。
展開全文文章收合