假設我們有以下權重圖,求解節點0到節點4的最短路徑。
digraph {
nodesep=1.0 // increases the separation between nodes
graph [rankdir=LR]
node [color=lightblue2, style=filled,shape=egg] //All nodes will this shape and colour
//All the lines look like this
0->1 [label=3]
0->2 [label=5]
1->3 [label=6]
1->4 [label=12]
3->4 [label=13]
2->4 [label=6]
}
在此類型問題中,或許會詢問此圖最短路徑長度為何?只要輸出11就可得到分數。若輸出11以外的數字,則為零分。
在此類型問題中,或許會詢問此圖最短路徑走訪順序為何?考生需輸出走訪順序,如:0 2 4。評分標準是以最佳解的值與求解的值之比例為依據。例如,走訪順序為0 1 3 4,則比例為\(11/22=0.5\)。題目所得最終比例為所有測資結果比例的平均。在所有測資中,若有產生無效解答(如:只產生0 2),則該題以零分計。
將所有考生所得到的最終比例依各別題目設定之正規化方法至\([0, 1]\)區間後乘於該題之配分。
C/C++, Java, Python
作業系統:Windows 10企業版
編譯參數:
C++17 / g++
/usr/bin/g++ -DEVAL -std=gnu++17 -O2 -pipe -static -s -o [problem name] [problem name].cpp
C11 / gcc
/usr/bin/gcc -DEVAL -std=gnu11 -O2 -pipe -static -s -o [problem name] [problem name].c -lm
Java / JDK
/usr/bin/javac [problem name].java
/bin/sh -c jar cf [problem name].jar *.class
Python 3 / CPython
/usr/bin/python3 -m compileall -b .
/bin/mv [problem name].pyc main.pyc
/usr/bin/zip [problem name].pyz main.pyc
可用之編輯器/IDE:Dev-C++、Codeblocks、vscode、vim
10:30 ~ 11:00 報到 (二樓電腦教室 教室代碼 65203)
11:00 ~ 12:00 機器測試
13:30 ~ 16:30 正式測驗
機器測試僅能攜帶文具進入試場,且須依照現場座位表入座,正式測驗時的座位亦同。
https://cplusplus.com/reference/
https://en.cppreference.com/w/
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing