{"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":"b39107f0-d3bb-57a8-bfd6-68f5a447d006","task_key":"ICPC~2dWorld~2dFinals--examples--2016~5fC","task_revision_id":"3","upstream_id":"2016_C","short_description":"Ceiling Function","config":"ICPC-World-Finals","split":"examples","body":"{\"platform\":\"atcoder\",\"question_content\":\"## Problem Description\\n\\nAdvanced Ceiling Manufacturers (ACM) is analyzing the properties of its new series of Incredibly Collapse-Proof Ceilings (ICPCs). An ICPC consists of \\\\( n \\\\) layers of material, each with a different value of collapse resistance (measured as a positive integer). The analysis ACM wants to run will take the collapse-resistance values of the layers, store them in a binary search tree, and check whether the shape of this tree in any way correlates with the quality of the whole construction.\\n\\nTo be precise, ACM takes the collapse-resistance values for the layers, ordered from the top layer to the bottom layer, and inserts them one-by-one into a tree. The rules for inserting a value \\\\( v \\\\) are:\\n\\n- If the tree is empty, make \\\\( v \\\\) the root of the tree.\\n- If the tree is not empty, compare \\\\( v \\\\) with the root of the tree. If \\\\( v \\\\) is smaller, insert \\\\( v \\\\) into the left subtree of the root, otherwise insert \\\\( v \\\\) into the right subtree.\\n\\nACM has a set of ceiling prototypes it wants to analyze by trying to collapse them. It wants to take each group of ceiling prototypes that have trees of the same shape and analyze them together.\\n\\nFor example, assume ACM is considering five ceiling prototypes with three layers each, as described by Sample Input 1. Notice that the first prototype’s top layer has collapse-resistance value 2, the middle layer has value 7, and the bottom layer has value 1. The second prototype has layers with collapse-resistance values of 3, 1, and 4 – and yet these two prototypes induce the same tree shape, so ACM will analyze them together.\\n\\nGiven a set of prototypes, your task is to determine how many different tree shapes they induce.\\n\\n## Input\\n\\nThe first line of the input contains two integers \\\\( n \\\\) (\\\\( 1 \\\\leq n \\\\leq 50 \\\\)), which is the number of ceiling prototypes to analyze, and \\\\( k \\\\) (\\\\( 1 \\\\leq k \\\\leq 20 \\\\)), which is the number of layers in each of the prototypes.\\n\\nThe next \\\\( n \\\\) lines describe the ceiling prototypes. Each of these lines contains \\\\( k \\\\) distinct integers (between 1 and \\\\( 10^6 \\\\), inclusive), which are the collapse-resistance values of the layers in a ceiling prototype, ordered from top to bottom.\\n\\n## Output\\n\\nDisplay the number of different tree shapes.\\n\\n## Sample Input 1\\n\\n```\\n5 3\\n2 7 1\\n3 1 4\\n1 5 9\\n2 6 5\\n9 7 3\\n```\\n\\n## Sample Output 1\\n\\n```\\n4\\n```\\n\\n## Sample Input 2\\n\\n```\\n3 4\\n3 1 2 40000\\n3 4 2 1\\n33 42 17 23\\n```\\n\\n## Sample Output 2\\n\\n```\\n2\\n```\",\"question_title\":\"Ceiling Function\"}","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":[]}