競技程式

tags: 講義

僑光科技大學 資訊科技系
授課老師:高吉隆
電子信箱:kevinkao888@gmail.com
上課日期:108/02/20 ~ 108/06/19
上課時間:星期三 15:10 ~ 17:00


課程大綱

  • C++語法複習
  • CPE 練習 Part1(迴圈)
  • CPE 練習 Part2(陣列)
  • CPE 練習 Part3(函數)
  • CPE 練習 Part2(結構)
  • 程式能力檢測為教學目標
  • 參加CPE考試可以答對題目,並且提升程式能力

上課日期 前 9 週上課目標 備註
1 108/02/20 課程說明
2 108/02/27 C++語法複習
3 108/03/06 CPE Part1(迴圈)1
4 108/03/13 CPE Part1(迴圈)2
5 108/03/20 CPE Part1(迴圈)3
6 108/03/27 CPE Part2(陣列)1 小考10%
7 108/04/03 CPE Part2(陣列)2
8 108/04/10 CPE Part2(陣列)3 小考10%
9 108/04/17 期中測驗 15%

上課日期 後 9 週上課目標 備註
10 108/04/24 CPE Part3(函數)1
11 108/05/01 CPE Part3(函數)2
12 108/05/08 CPE Part4(結構)1
13 108/05/15 CPE Part4(結構)2
14 108/05/22 CPE Part4(結構)3 考試10%
15 108/05/29 CPE Part5(指標)1
16 108/06/05 CPE Part5(指標)2
17 108/06/12 CPE考試複習 平時10%
18 108/06/19 準備CPE考試 30%

課程評分方式

  • 平時成績:30% (上課互動+二次小考)
    • 上課互動:10% (10次點名)
    • 第一次小考:10% (108/03/27)
    • 第二次小考:10% (108/04/10)
  • 期中成績:15% (108/04/15)
    • 考試範圍:C#程式基礎 物件導向
  • 期末成績:40% (期末報告)
    • 第三次小考:10% (108/05/22) 函數、結構、指標
    • 期末考:30% (108/06/17) CPT考試

第一次作業

  • 依回答題數1-26題平均配分至60-100分
  • 未回答任何1題者為50分,平均70分
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

第一次小考

  • 依回答題數2-10題平均配分至30-100分
  • 未回答任何1題者為20分,平均70分
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

期中考

  • 依回答題數1-7題平均配分至55-90分
  • 平均77分
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

第二次小考

  • 滿分100分,每錯1題扣4分
  • 平均70分,最高分100分,最低分40分
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

第三次小考

  • 滿分100分,每錯1題扣4分(後來改為3分)
  • 平均77分(不含缺考),最高分100分,最低分52分
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

CPE 大學程式能力檢定考

  • CPE網址:https://cpe.cse.nsysu.edu.tw/
  • CPE大學程式能力檢定應考策略:連結
  • 瘋狂程設:http://coding-frenzy.arping.me/
    • 程式下載:瘋狂程設MinGW
    • 解壓縮至根目錄:C:\或D:\
    • 執行主程式:CodingFrenzy.exe
    • 同意以下各授權規定
    • 訪客直接登入:預設為程式練習廣場
    • 選擇第01關:變數與計算
    • 選擇題號:A001 HelloWorld
    • 選擇練習:進入回答視窗

編譯器使用MinGW

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Step1: 請按Install Step2: 請按Continue

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Step3: 請按Continue Step4: 請選擇C++

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Step5: 請按Apply Changes Step6: 請選擇Apply

瘋狂程設題目:A001 HelloWorld©

  • 題目資料:請在命令視窗中印出 "Hello World!"。
  • 選擇編譯器:MinGW
  • 撰寫main函數:
#include<stdio.h>
int main() {
	printf("Hello World!");
	return 0;
}

瘋狂程設題目:A001 HelloWorld(C++)

  • 題目資料:請在命令視窗中印出 "Hello World!"。
  • 選擇編譯器:MinGW
  • 撰寫main函數:
#include<iostream>
using namespace std;
int main() {
	cout << "Hello World!";
	return 0;
}

瘋狂程設題目:A001 HelloWorld(C#)

  • 題目資料:請在命令視窗中印出 "Hello World!"。
  • 選擇編譯器:MSCS
  • 撰寫main函數:
using System; namespace HelloWorld { class Hello { static void Main() { Console.Write("Hello World!"); } } }

瘋狂程設題目:A001 HelloWorld(VB)

  • 題目資料:請在命令視窗中印出 "Hello World!"。
  • 選擇編譯器:MSVB 2.0.50727
  • 撰寫main函數:
Module Program Sub Main() Console.Write("Hello World!") End Sub End Module

瘋狂程設 - 註冊帳號

  • 輸入電子信箱:按取得帳號金鑰
  • 收信:開通帳號

瘋狂程設 - 登入帳號


瘋狂程設 - 使用方式

  • 選擇程式練習廣場
  • 選擇關卡:第01關變數與計算
  • 選擇題目:練習(已有紀錄)或挑戰(標記金牌)
    • 練習:部分有解題說明、可以上網查資料
    • 挑戰:完全自行完成程式,不可以上網
  • 選擇編譯器:MinGW
  • 編譯測試:使用自訂測試資料
  • 批改交卷:通過或不通過
  • 更新畫面:按F5



  • 第01關變數與計算
  • (A003) 攝氏轉華氏 : 輸入攝氏溫度,輸出華氏溫度。(華式F)=(攝氏C)*9/5+32,小數部分請無條件捨去。
#include<stdio.h> int main() { int c, f; scanf("%d", &c); f = (int) c * 9 / 5 + 32; printf("C=\nF=%d", f); return 0; }

資訊週程式競賽練習

  • 競賽日期:05/14(二)09:00 ~ 13:00
  • 兩人為1組報名,回答5題程式題目
  • 加分方式:只要答對1題,程式競技學期總分加2分,最多加10分
    • 加分會按比例加至期末、平時成績、學期調分
  • Dev-C++:下載
  • 題目:連結

資訊週程式競賽規則:

  • 每組使用兩台電腦,組員間可以低聲討論,並以不妨礙他人為原則。
  • 競賽過程中網路一律斷線,且禁止使用手機、隨身碟。
  • 每題均以「通過」及「不通過」作業評審方式。檢驗是否通過係以數筆測試資料進行測試,必須每組測試資料執行結果都正確才算通過。
  • 競賽各組成績以答對題數為主,題數相同者以答題花費總時間較少者為優勝。
  • 每題作答完成可舉手請求確認及檢測,但檢測如答案錯誤,則需另行增加20分鐘計算在總花費時間中。

CPE 大學程式能力檢定

  • 報名日期:05/14(二)14:25~05/24(五)18:00
  • 考試日期:05/28(二)17:30~21:40
  • 考試地點:逢甲大學資訊電機館
  • 本次考試至少有一題選自一顆星選集
  • 加分方式:只要答對1題,程式競技學期總分加5分,最多加10分
    • 加分會按比例加至期末、平時成績、學期調分
  • UVA考題(100~1999):UVA Online Judge1
  • UVA考題(10000~):UVA Online Judge2
  • 中文題目、依條件快速搜尋:LuckyCat
  • 參考解答:KnightZone

題目 英文
1 Vito's family 10041 中文 連結
2 Hashmat the
brave warrior
10055 中文 連結
3 Primary Arithmetic 10035 中文 連結
4 The 3n + 1 problem 100 中文 連結
5 You can say 11 10929 中文 連結
6 Bangla Numbers 10101 連結
7 List of Conquests 10420 連結

題目 英文
8 What's Cryptanalysis? 10008 中文 連結
9 Decode the Mad man 10222 中文 連結
10 Summing Digits 11332 中文 連結
11 Common Permutation 10252 連結
12 Rotating Sentences 490 中文 連結
13 TeX Quotes 272 中文 連結

題目 英文 中文 解答
14 Doom's Day Algo. 12019 中文 連結
15 Jolly Jumpers 10038 中文 連結
16 What is the Prob. 10056 中文
17 Hotel Infinite Rooms 10170 中文 連結
18 498’ 10268 中文
19 Odd Sum 10783 中文 連結
20 Beat the Spread! 10812 中文 連結