【正文】
Exercises 輸入: 總共有好幾組測資。遇到檔案結(jié)尾 EOF 代表結(jié)束。 Introduction 9 以下是一個(gè)輸出入的實(shí)例 : Sample Input Sample Output sequence subsequence person pression VERDI vivaVittorioEmanueleReDiItalia caseDoesMatter CaseDoesMatter Yes No Yes No Introduction 10 Exercises Problem 2: 小鮑伯喜歡玩積木。小鮑伯很開心的告訴他姊姊愛麗絲 :「你看,我把牆蓋起來了!」。在經(jīng)過一番思考後,小鮑伯覺得姊姊是對(duì)的,於是他決定要重新堆那些積木。每組測資的一開始是一個(gè)整數(shù) n,代表小鮑伯疊的積木堆數(shù)。你可以假設(shè) 1?n?50 以及 1?高度?100。當(dāng) n=0 時(shí)代表輸入結(jié)束。接著印” The minimum number of moves is k.” ,其中 k 代表的是最少需要移動(dòng)多少積木才能讓所有的積木堆有相同的高度。 Introduction 12 以下是一個(gè)輸出入的實(shí)例 : Sample Input Sample Output 6 5 2 4 1 7 5 0 Set 1 The minimum number of moves is 5. Introduction 13 Exercises Problem 3: 某個(gè)銀