| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 5 초 | 2048 MB | 6 | 2 | 2 | 40.000% |
A Makefile is a file that specifies dependencies between different source code files. When one source code file changes, this file needs to be recompiled, and when one or more dependencies of another file are recompiled, that file needs to be recompiled as well. Given the Makefile and a changed file, output the set of files that need to be recompiled, in an order that satisfies the dependencies (i.e., when a file $X$ and its dependency $Y$ both need to be recompiled, $Y$ should come before $X$ in the list).
The input consists of:
:" where $f$ is a filename, and is then followed by a list of the filenames of the dependencies of $f$. Each file has at most 5ドル$ dependencies.Filenames are strings consisting of between 1ドル$ and 10ドル$ English lowercase letters (a-z). Exactly $n$ different filenames appear in the input file, each appearing exactly once as $f$ in a Makefile rule. The rules are such that no two files depend (directly or indirectly) on each other.
Output the list of files that need to be recompiled, in an order such that all dependencies are satisfied.
If there are multiple valid solutions, you may output any one of them.
6 gmp: solution: set map queue base: set: base gmp map: base gmp queue: base gmp
gmp map set solution