[Startups] OA 2025 Start – 02 Feb (Generic)

Password Recovery via File Hints

Problem Statement:

You are given an API function:

def solve(files: List[str], hints: List[str]) -> str:

where:

  • files: A list of file paths (e.g., ["/path-to-a/file-a.txt", "path-to-b/b.jpeg"]).
  • hints: A list of hints, formatted as "filename hint_pattern", where hint_pattern contains a partially revealed password with . for unknown characters and [X-Y] for possible character ranges.

Your task is to implement this API such that:

  1. You can return a READ command to read valid .txt files (e.g., return "READ /path-to-a/file-a.txt").
  2. Each READ command provides new hints, which are appended to the hints parameter in subsequent calls.
  3. Once you deduce the complete password, return the ROOT command with the recovered password: return "ROOT {password}"
  4. The solution must be completed within 100 API calls.

Command Format:

  • To read a file: "READ {file_path}" (only .txt files allowed).
  • To submit the password: "ROOT {password}".

Example Flow:

Initial Call

solve(["/path/file1.txt", "/path/image.jpg"], [])

API Returns

"READ /path/file1.txt"

Next Call (after reading)

solve(["/path/file1.txt", "/path/image.jpg"], ["/path/file1.txt ..a[b-d]c[1-3]"])

Password Deduction

If you gather enough hints (e.g., "..a[b-d]c[1-3]" means possible passwords are aac1, aac2, aac3, abc1, abc2, etc.), you submit:

"ROOT aac1"

我们长期稳定承接各大科技公司如TikTok、Google、Amazon等的OA笔试代写服务,确保满分通过。如有需求,请随时联系我们。

We consistently provide professional online assessment services for major tech companies like TikTok, Google, and Amazon, guaranteeing perfect scores. Feel free to contact us if you're interested.

Leave a Reply

Your email address will not be published. Required fields are marked *