{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"hlce","formal_name":"Humanity's Last Code Exam","introduction":"Humanity's Last Code Exam evaluates problem solving and code generation using ICPC World Finals and IOI problems. The project describes 235 problems; this import selects its public ICPC dataset of 146 problems.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://humanity-s-last-code-exam.github.io/website/","indexing_mode":"noindex","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[]}},"task_id":"a6a3586b-a4be-5cfb-bed9-8f588b002552","task_key":"ICPC~2dWorld~2dFinals--examples--2017~5fL","task_revision_id":"3","upstream_id":"2017_L","short_description":"Visual Python++","config":"ICPC-World-Finals","split":"examples","body":"{\"platform\":\"atcoder\",\"question_content\":\"## Problem Description\\n\\nIn the recently proposed Visual Python++ programming language, a block of statements is represented as a rectangle of characters with top-left corner in row \\\\(r_1\\\\) and column \\\\(c_1\\\\), and bottom-right corner in row \\\\(r_2\\\\) and column \\\\(c_2\\\\). All characters at locations \\\\((r, c)\\\\) with \\\\(r_1 \\\\leq r \\\\leq r_2\\\\) and \\\\(c_1 \\\\leq c \\\\leq c_2\\\\) are then considered to belong to that block. Among these locations, the ones with \\\\(r = r_1\\\\) or \\\\(r = r_2\\\\) or \\\\(c = c_1\\\\) or \\\\(c = c_2\\\\) are called a border.\\n\\nStatement blocks can be nested (rectangles contained in other rectangles) to an arbitrary level. In a syntactically correct program, every two statement blocks are either nested (one contained in the other) or disjoint (not overlapping). In both cases, their borders may not overlap.\\n\\nProgrammers are not expected to draw the many rectangles contained in a typical program – this takes too long, and Visual Python++ would not have a chance to become the next ICPC programming language. So a programmer only has to put one character ‘p’ in the top-left corner of the rectangle and one character ‘y’ in the bottom-right corner. The parser will automatically match up the appropriate corners to obtain the nesting structure of the program.\\n\\nYour team has just been awarded a five-hour contract to develop this part of the parser.\\n\\n## Input\\n\\nThe first line of the input contains an integer \\\\(n\\\\) \\\\((1 \\\\leq n \\\\leq 10^5)\\\\), the number of corner pairs. Each of the next \\\\(n\\\\) lines contains two integers \\\\(r\\\\) and \\\\(c\\\\) \\\\((1 \\\\leq r, c \\\\leq 10^9)\\\\), specifying that there is a top-left corner in row \\\\(r\\\\) and column \\\\(c\\\\) of the program you are parsing. Following that are \\\\(n\\\\) lines specifying the bottom-right corners in the same way. All corner locations are distinct.\\n\\n## Output\\n\\nDisplay \\\\(n\\\\) lines, each containing one integer. A number \\\\(j\\\\) in line \\\\(i\\\\) means that the \\\\(i\\\\)-th top-left corner and the \\\\(j\\\\)-th bottom-right corner form one rectangle. Top-left and bottom-right corners are each numbered from 1 to \\\\(n\\\\) in the order they appear in the input. The output must be a permutation of the numbers from 1 to \\\\(n\\\\) such that the matching results in properly nested rectangles. If there is more than one valid matching, any one will be accepted. If no such matching exists, display `syntax error`.\\n\\n## Sample Input 1\\n\\n```\\n2\\n4 7\\n9 8\\n14 17\\n19 18\\n```\\n\\n## Sample Output 1\\n\\n```\\n2\\n1\\n```\\n\\n## Sample Input 2\\n\\n```\\n2\\n4 7\\n14 17\\n9 8\\n19 18\\n```\\n\\n## Sample Output 2\\n\\n```\\n1\\n2\\n```\\n\\n## Sample Input 3\\n\\n```\\n2\\n4 8\\n9 7\\n14 18\\n19 17\\n```\\n\\n## Sample Output 3\\n\\n```\\nsyntax error\\n```\\n\\n## Sample Input 4\\n\\n```\\n3\\n1 1\\n4 8\\n8 4\\n10 6\\n6 10\\n10 10\\n```\\n\\n## Sample Output 4\\n\\n```\\nsyntax error\\n```\",\"question_title\":\"Visual Python++\"}","display_format":"text","language":"","answer_status":"published","assets":[],"source_url":"https://humanity-s-last-code-exam.github.io/website/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}