ผลต่างระหว่างรุ่นของ "01204212/statuses"

จาก Theory Wiki
ไปยังการนำทาง ไปยังการค้นหา
(หน้าที่ถูกสร้างด้วย 'You are given an information on comments are posted. You want to print out a report on that in a nicely form. '''Input''' * First li...')
 
แถว 4: แถว 4:
  
 
* First line: integer ''n'' (the number of comments)
 
* First line: integer ''n'' (the number of comments)
* The next ''n'' lines, each line specify a comment:
+
* The next ''n'' lines, each line specify a comment.  Line ''i + 1'' for ''1<=i<=n'' specifies the ''i''-th comment.  In this line, there is an integer ''p'' and a string ''s'' (consiting of a - z and an underline (_) whose length is at most 30).  This comment replies to the ''p''-th comment.  If ''p''=0, this comment replies to the status itself.  The string ''s'' is the comment text.
 +
 
 +
'''Input example'''

รุ่นแก้ไขเมื่อ 06:37, 17 สิงหาคม 2559

You are given an information on comments are posted. You want to print out a report on that in a nicely form.

Input

  • First line: integer n (the number of comments)
  • The next n lines, each line specify a comment. Line i + 1 for 1<=i<=n specifies the i-th comment. In this line, there is an integer p and a string s (consiting of a - z and an underline (_) whose length is at most 30). This comment replies to the p-th comment. If p=0, this comment replies to the status itself. The string s is the comment text.

Input example