This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: size > 0 is the integer size of the file/directory; * means the name is a directory. It is guaranteed that name will not contain characters '(', ')', '[', ']', and ' * '. There are no more than 10 levels for each case, and no more than 10 files/directories on each level. Output Specification: For each test case, list the tree in the format shown by the sample. Files/directories that are of depth d will have their names indented by 8 d spaces. Do NOT print tabs to indent the output. The size of a directory D is the sum of the sizes of all the files/directories in D, plus its own size. Sample Input: */usr 1 (*mark 1 *alex 1) (hw.c 3 *course 1) (hw.c 5) (aa.txt 12) */usr 1 () Sample Output: ( represents a space) |_*/usr |_*mark | |_hw.c | |_*course | |_aa.txt |_*alex |_hw.c |_*/usr...
View Full Document
This note was uploaded on 02/16/2011 for the course CS 135 taught by Professor Yuechen during the Fall '08 term at Zhejiang University.
- Fall '08