2064 - EECS2040 Makeup quiz Scoreboard

Time

2020/06/15 18:40:00 2020/06/15 20:40:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
12736 Quiz1 Cargo Truck Problem
12754 DS_Quiz2_PlantFlower
12792 Brute-forcibly Finding Tree Anagrams
12802 Least Skill Point
12831 Maze Cost Sorting

12736 - Quiz1 Cargo Truck Problem   

Description

We wants to transport some items using a truck.

Can these items be packed into the truck?
- Do not flip or rotate items
- Items must touch the floor of the truck
- Items must occupy the entire length (without space that allows the items to move forward or backword)

Input

1. Number of items (<10)

2. the "exact" width and height of the item
   - 1st item
   - 2nd item ...
   (The items will be compose of )

3. Number of Truck lengths to check
   - The lengths to check (Repeating is fine)
 

Output

Answer Yes or No for each truck length

Sample Input  Download

Sample Output  Download

Tags




Discuss




12754 - DS_Quiz2_PlantFlower   

Description

The simulation takes place in one matrix(X, Y).
The seeds will be randomly planted into the matrix.

The seed is planted followed by the coordinate and what type of flower it is.
If two seeds are planted too close, they will fight for nutrition hence grow fewerer flowers.

  • Ideally, with enough nutrition, each seed will grows eight flowers.
    • However, each seed in the orthogonally adjacent cell will reduce the number of flowers to one-half.
    • If there are seeds in more than 3 orthogonally adjacent cells, there will be no flowers. 

Your goal is 1) to count the number of flowers in total; 2) to provide the names of flowers in the target column.

Input

You will receive several lines:
First line includes 3 numbers: #row, #column, target column.

Second line has an number, which means the #of seeds plant.

And following lines will write in the format: inserted row, inserted column, flower name.

Output

First line prints out the total number of bloom flowers.

Second line prints out the names of flowers in the target column. (No space or ‘\n’ at the end.

Sample Input  Download

Sample Output  Download

Tags

sparse matrix linked list



Discuss




12792 - Brute-forcibly Finding Tree Anagrams   

Description

Anagrams means "變位字" in Chinese. Assume we have a word  "HEART"  and we want "HEART" to be the level-order sequence and "EARTH" to be the in-order sequence, the tree would exist. However, if we set "EARTH" to be the level-order sequence and "HEART" to be the in-order sequence, then the tree will not exist.

Input

1. Size in the following heap array

2. The given tree in the heap format

3. Number of the following word pairs

Output

Is each pair of words anagrams according to the given tree? Yes or No

Sample Input  Download

Sample Output  Download

Tags




Discuss




12802 - Least Skill Point   

Description

In RPG games, how to spend minimal skill points to learn the needed skill is always a challenge for gamers. (The needed skill point is the same.)

 

Input

First-line contains two integers N, M. Where N is the number of skills and M is the number of relations.

The following two lines are two characters for the starting skill you already learned and the target skill you want to learn.

Following M lines contain one edge each, in form A B. This means that there exists a path from skill A to skill B. (all the needed skill points are 1)

Output

In the first line, please print the minimal cost you need to spend to learn the skill.

In the second-line please print the node on the shortest path. There is no white space or newline in the end.

Sample Input  Download

Sample Output  Download

Tags




Discuss




12831 - Maze Cost Sorting   

Description

HINT: 
It is not necessary to traverse through the maze.
You can use "for loop" to check each node to count the number of neighbors for each node.

Input

Output

Sample Input  Download

Sample Output  Download

Tags




Discuss