Skip to content

Latest commit

 

History

History

hw05

HW05 - Word Chain

Description

You are given a sequence of tokens, where each token represents a word. Your task is to find a sequence of tokens with a total depth of 4, starting from a given starting token, such that the product of the probability of each token following the previous one is maximized.

Examples

Example 1:

Input: A = ["國立","國立 中興 南區 國立 中興 大學 大學 國立 中興 大學 學店"]
Output: 國立 中興 南區 國立

File Structure

./
├─ WordChain.java                   # Abstract Class
├─ HW05.java                        # Runner
├─ HW05_4111056036_1.java           # Version 1
├─ HW05_4111056036_2.java           # Version 2
├─ HW05_4111056036_3.java           # Version 3
├─ HW05_4111056036_4.java           # Version 4
├─ HW05_4111056036_5.java           # Version 5
├─ StopWatch.java                   # Class for Calculate Runtime
├─ build.sh                         # Compile Script
└─ README.md

Score

Best Version

Rank Version Status Time
3/106 HW05_4111056036_2 Correct 0.00282147

Note: The rank is compared to the best submissions from all participants.

All Versions

Rank Version Status Time
4/283 HW05_4111056036_2 Correct 0.00282147
5/283 HW05_4111056036_1 Correct 0.002855788
8/283 HW05_4111056036_5 Correct 0.004059308
19/283 HW05_4111056036_4 Correct 0.005835121
21/283 HW05_4111056036_3 Correct 0.006104075

Note: The ranks are compared to all submissions from all participants.