Team Ai
Datasetpublic

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.

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
3likes139downloads
p00918.html114 linesDownload Raw Back to problem_descriptions
1 2<H1><font color="#000">Problem E: </font>Dragon's Cruller</H1>3 4<p>5Dragon's Cruller is a sliding puzzle on a torus. The torus surface is partitioned into nine squares as shown in its development in Figure E.1. Here, two squares with one of the sides on the development labeled with the same letter are adjacent to each other, actually sharing the side. Figure E.2 shows which squares are adjacent to which and in which way. Pieces numbered from 1 through 8 are placed on eight out of the nine squares, leaving the remaining one empty.6</p>7 8<center>9<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_dragonsCruller1" style="aling:center"><br/>10<p>11Figure E.1. A 3 × 3 Dragon’s Cruller torus12</p>13</center>14<br/>15 16<p>17A piece can be slid to an empty square from one of its adjacent squares. The goal of the puzzle is, by sliding pieces a number of times, to reposition the pieces from the given starting arrangement into the given goal arrangement. Figure E.3 illustrates arrangements directly reached from the arrangement shown in the center after four possible slides. The cost to slide a piece depends on the direction but is independent of the position nor the piece.18</p>19<p>20Your mission is to find the minimum cost required to reposition the pieces from the given starting21arrangement into the given goal arrangement.22</p>23 24<center>25<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_dragonsCruller2" style="aling:center"><br/>26<p>27Figure E.2. Adjacency28</p>29</center>30<br/>31<center>32<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_dragonsCruller3" style="aling:center"><br/>33<p>34Figure E.3. Examples of sliding steps35</p>36</center>37<br/>38 39<p>40Unlike some sliding puzzles on a flat square, it is known that any goal arrangement can be reached from any starting arrangements on this torus.41</p>42 43 44<H2>Input</H2>45 46<p>47The input is a sequence of at most 30 datasets.48</p>49 50<p>51A dataset consists of seven lines. The first line contains two positive integers <var>c<sub>h</sub></var> and <var>c<sub>v</sub></var>, which represent the respective costs to move a piece horizontally and vertically. You can assume that52both <var>c<sub>h</sub></var> and <var>c<sub>v</sub></var> are less than 100. The next three lines specify the starting arrangement and the last three the goal arrangement, each in the following format.53</p>54 55<pre>56<var>d<sub>A</sub></var> <var>d<sub>B</sub></var> <var>d<sub>C</sub></var>57<var>d<sub>D</sub></var> <var>d<sub>E</sub></var> <var>d<sub>F</sub></var>58<var>d<sub>G</sub></var> <var>d<sub>H</sub></var> <var>d<sub>I</sub></var>59</pre>60 61<p>62Each line consists of three digits separated by a space. The digit <var>d<sub>X</sub></var> (<var>X</var> is one of <var>A</var> through <var>I</var>) indicates the state of the square <var>X</var> as shown in Figure E.2. Digits <span>1</span>, . . . , <span>8</span> indicate that the piece of that number is on the square. The digit <span>0</span> indicates that the square is empty.63</p>64 65<p>66The end of the input is indicated by two zeros separated by a space.67</p>68 69<H2>Output</H2>70 71<p>72For each dataset, output the minimum total cost to achieve the goal, in a line. The total cost is the sum of the costs of moves from the starting arrangement to the goal arrangement. No other characters should appear in the output.73</p>74 75<H2>Sample Input</H2>76<pre>774 9786 3 0798 1 2804 5 7816 3 0828 1 2834 5 78431 31854 3 6860 1 5878 2 7880 3 6894 1 5908 2 79192 4921 5 3934 0 7948 2 6951 5 0964 7 3978 2 69812 28993 4 51000 2 61017 1 81025 7 11038 6 21040 3 41050 0106</pre>107 108<H2>Output for the Sample Input</H2>109<pre>11001113111296113312114</pre>