Categories
CPE 程式解答

10400: The 3n + 1 problem

10400:The 3n + 1 problem Time Limit: 10 sec Background Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is not known for all possible inputs. Description Consider the following algorithm: […]

Categories
CPE 程式解答

10401: Fibonaccimal Base

10401: Fibonaccimal Base Time Limit: 10 sec Background The well known Fibonacci sequence is obtained by starting with 0 and 1 and then adding the two last numbers to get the next one. For example the third number in the sequence is 1 (1=1+0), the forth is 2 (2=1+1), the fifth is 3 (3=2+1) and […]

Categories
CPE 程式解答

10402: What's Cryptanalysis?

10402:What's Cryptanalysis? Time Limit: 3 sec Description Cryptanalysis is the process of breaking someone else's cryptographic writing. This sometimes involves some kind of statistical analysis of a passage of (encrypted) text. Your task is to write a program which performs a simple analysis of a given text. Input The first line of input contains a […]

Categories
CPE 程式解答

10403: Funny Encryption Method

10403: Funny Encryption Method Time Limit: 3 sec Background A student from ITESM Campus Monterrey plays with a new encryption method for numbers. These method consist of the following steps: Steps : (Example for 265) 1) Read the number N to encrypt M = 265 2) Interpret N as a decimal number X1= 265 (decimal) […]

Categories
CPE 程式解答

10409: A mid-summer night’s dream

10409: A mid-summer night’s dream Time Limit: 3 sec Description This is year 2200AD. Science has progressed a lot in two hundred years. Two hundred years is mentioned here because this problem is being sent back to 2000AD with the help of time machine. Now it is possible to establish direct connection between man and […]

Categories
心情点滴

終於把CPE考掉了 呼呼

交大資工系有個規矩 就資工系的學生必須考過程式鑒定考試 不然當修專題 說實話 這個要求其實也不算太過分 程式鑒定考試一次出7題 答對2題就算過關了 成績的話就答對兩題B,三題A-,四題A,五以上A+ 就是也許需要花點時間瞭解一下C++里一些container和algorithm的用法之類的東西 上學期修OOP的時候較常使用c++的container和各種algorithm裏面內建的function 如果大一下就直接去考 也許會過得更輕鬆些 反倒這學期修資料結構 都自己寫 有時候想錯了 又鉆牛角尖 結果就爆掉了 (pls: 跟我第一次沒複習直接去考的情況一樣 QQ) 這次考程式鑒定考試說實話考得有點囂張 好像是第二個出來 花了不到1小時就寫完2題了 帶著只求過的心理 我就離開考場了 XD 考完之後 瞬間輕鬆了 哦也..... 可惜後面緊接著的還有一堆的專題,作業,期末考..... 好吧 悲劇的日子剩下3個星期了 撐一下就過了不是嗎?XD pls:關於CPE 我打算把自己寫過的一些題目放上來 供後人參考 希望後人看見後別吐槽我的coding style XD

Categories
CPE 程式解答

10404: Primary Arithmetic

10404: Primary Arithmetic Time Limit: 3 sec Description Children are taught to add multi-digit numbers from right-to-left one digit at a time. Many find the "carry" operation - in which a 1 is carried from one digit position to be added to the next - to be a significant challenge. Your job is to count […]