← 返回 google 的题目列表Debug Feature Enablement With Dependencies and Constraints
类型:online_judge
You are given a config file feature.txt that defines a set of features and their dependencies. You are also given a request input:
User info: user id, country, and OS version.
A set of pre-enabled features.
A set of requested features to enable.
You must debug the provided code (the OA allows an built-in AI tool) so that it correctly enforces:
A feature can be enabled only if the user satisfies its country and OS version constraints.
All dependencies (possibly transitive) of every requested feature must be enabled.
There must be no cycles in the dependency graph; if cycles exist, treat as invalid / error as specified.
Fix the code so that it produces the correct output for the given inputs.
Note: The shared interview memory did not include crucial details; defer to the OA prompt for:
The exact feature.txt schema and parsing rules.
How dependencies are represented.
The expected output format (final enabled set, boolean feasibility, error reasons, ordering, etc.).