prithivMLmods/Coder-Stat
Coder-Stat Dataset Overview The Coder-Stat dataset is a collection of programming-related data, including problem IDs, programming languages, original statuses, and source code snippets. This dataset is designed to assist in the analysis of coding patterns, error types, and performance metrics. Dataset Details Modalities Tabular: The dataset is structured in a tabular format. Text: Contains text data, including source code snippets.… See the full description on the dataset page: https://huggingface.co/datasets/prithivMLmods/Coder-Stat.
3139
1 2<h1>3Pile Up!4</h1>5 6<p>There are cubes of the same size and a simple robot named Masato. Initially, 7all cubes are on the floor. Masato can be instructed to pick up a cube and put 8it on another cube, to make piles of cubes. Each instruction is of the form 9`pick up cube <i>A</i> and put it on cube <i>B</i> (or on the floor).' </p>10<p>When he is to pick up a cube, he does so after taking off all the cubes on 11and above it in the same pile (if any) onto the floor. In contrast, when he is 12to put a cube on another, he puts the former on top of the pile including the 13latter without taking any cubes off. </p>14<p>When he is instructed to put a cube on another cube and both cubes are 15already in the same pile, there are two cases. If the former cube is stacked 16somewhere below the latter, he put off all the cube above it onto the floor. 17Afterwards he puts the former cube on the latter cube. If the former cube is 18stacked somewhere above the latter, he just ignores the instruction. </p>19<p>When he is instructed to put a cube on the floor, there are also two cases. 20If the cube is already on the floor (including the case that the cube is stacked 21in the bottom of some pile), he just ignores the instruction. Otherwise, he puts 22off all the cube on and up above the pile (if any) onto the floor before moving 23the cube onto the floor. </p>24<p>He also ignores the instruction when told to put a cube on top of itself 25(this is impossible). </p>26<p>Given the number of the cubes and a series of instructions, simulate actions 27of Masato and calculate the heights of piles when Masato has finished his job. 28</p>29<h2>Input</h2>30<p>The input consists of a series of data sets. One data set contains the number 31of cubes as its first line, and a series of instructions, each described in a 32separate line. The number of cubes does not exceed 100. Each instruction 33consists of two numbers; the former number indicates which cube to pick up, and 34the latter number indicates on which cube to put it. The end of the instructions 35is marked by two zeros. </p>36<p>The end of the input is marked by the line containing a single zero. </p>37<p>One data set has the following form:</p>38 39<pre><i>m</i>40<i>I</i><sub>1</sub> <i>J</i><sub>1</sub>41<i>I</i><sub>2</sub> <i>J</i><sub>2</sub>42...43<i>I</i><sub><i>n</i></sub> <i>J</i><sub><i>n</i></sub>440 045</pre>46 47<p>Each cube is identified by its number (1 through <i>m</i>). 48<i>I</i><sub><i>k</i></sub> indicates which cube to pick up and 49<i>J</i><sub><i>k</i></sub> indicates on which cube to put it. The latter may be 50zero, instructing to put the cube on the floor. </p>51<h2>Output</h2>52<p>Output the height of each pile (the number of cubes in the pile) in ascending 53order, separated by newlines. A single cube by itself also counts as "a pile." 54End of output for one data set should be marked by a line containing the 55character sequence `end' by itself. </p>56<h2>Sample Input</h2>57 58<pre>593601 3612 0620 0634644 1653 1661 2670 0685692 1703 1714 1723 2731 1740 075076</pre>77 78<h2>Output for the Sample Input</h2>79 80<pre>81182283end84185186287end88189490end91</pre>92 93 94 95 