| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 12199 | 電機系資料結構上機考 (Word Puzzle) |
|
| 12225 | Quiz2 (Bus Route Linked List) |
|
| 12253 | Quiz3 (Tic Tac Toe Tree) |
|
| 12260 | Quiz4 (Network Planning Graph) |
|
| 12314 | Quiz5 (Frequency Sort) |
|
Description
Given a word puzzle and some words, please identify the corordinates of the words in the puzzle.
For example, please find "cool", "cat", "vain", "soul" in the following puzzle.
Input
The first integer is the width and also the height of the word puzzle.
Then, the word puzzle is listed.
Then the second integer is the number of words to find.
Then, the words to find are listed in one line.
Output
If a word is found in the puzzle, please report "Yes", then its starting position (row, col) and ending position (row, col), and then also print the word with vowels first and consonants afterward.
- For example, "cool" appears in the puzzle from 1,0 to 4,0, "cat" appears in the puzzle from 0,2 to 0,4, "vain" appears in the puzzle from 4,4 to 4,1.
- Please note that we only count vertical or horizontal words (no diagonal ones)
If a word is not in the puzzle, please report "No".
Sample Input Download
Sample Output Download
Tags
Discuss
Description
[ 一定要用自己實現的 linked list 完成! ]
A bus route editor needs to support two operations:
INSERT (src, dst, new, method)
- src: the name of the source bus stop
- dst: the name of the destination bus stop, which is next to the src stop
- new: the name of the newly added bus stop
- method:
- 1: insert the new stop in between src-->dst
- 2: In addition to src-->dst, also insert the same stop in between dst-->src if appropriate
RENAME (old_name, new_name)
- Replace the name of all bus stop from the old_name to the new_name
The bus route contains NTHU and TSMC in the beginning. After performing the operations, you are required to output:
- The total number of stops starting from NTHU and back to NTHU (NTHU is only counted once)
- Minimum number of stops of each src-dst pair (from src to dst)
- If src or dst does not exist, output “Missing src”, “Missing dst”, or “Missing both”
You can redirect cin to a string according to problem 12156
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Given:
- a series of nodes representing the steps in Tic Tac Toe
- a Tic-Tac-Toe grid (盤面)
Task:Find the path leading to the grid (盤面)
Input
The first integer is the number of nodes. Each node consists of:
- ID
- Parent ID (-1 represent null for root)
- X, Y
- Mark
Each node will have at most 2 children.
The last three lines are the tic-tac-toe grid. Each line has 3 marks (‘X’,’O’,’_’), separated by whitespaces, newline at the end.
The grid (盤面) in input definitely exists and is unique.
Output
IDs of the nodes in the path leading to the grid, separated by whitespaces, followed by a new line
eg. 0 1 3 8 11
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Given a graph
- Each node stands for a building
- Node 0 stands for a video source (e.g., a Netflix server)
- Each edge stands for a possible connection
- Both edges and nodes (including node 0) are specified by their latency
Task
- We wants the network to be a spanning tree
- Find the minimum-possible latency from the video source to each building
Input
Output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Encode a word based on the character distribution in a text.
Input
- The first line of input contains a single positive integer n (number of lines of the text) and a word, separated by a comma, followed by newline.
- The next n lines contains zero or more characters(with whitespace), they all end in newlines. This will be the text.
Output
The word reordered using the character distribution order, followed by a new line.