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
p00723.html119 linesDownload Raw Back to problem_descriptions
1 2<h1><font color="#000">Problem B:</font> <a name="section_B">Organize Your Train part II</a></h1>3 4 5<p>6RJ Freight, a Japanese railroad company for freight operations7has recently constructed exchange lines at Hazawa, Yokohama.8The layout of the lines is shown in Figure B-1.9</p>10 11<center>12<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_Layout"><br>13<!-- begin en only -->14Figure B-1: Layout of the exchange lines15<!-- end en only -->16</center>17 18<!-- begin en only -->19<p>20A freight train consists of 2 to 72 freight cars.  There are 2621types of freight cars, which are denoted by 26 lowercase letters22from "a" to "z".  The cars of the same type are indistinguishable from23each other, and each car's direction doesn't matter either.24Thus, a string of lowercase letters of length 2 to 72 is sufficient25to completely express the configuration of a train.26</p>27<!-- end en only -->28 29 30<!-- begin en only -->31<p>32Upon arrival at the exchange lines, a train is divided into two33sub-trains at an arbitrary position (prior to entering the34storage lines).  Each of the sub-trains may have its direction35reversed (using the reversal line).  Finally, the two sub-trains36are connected in either order to form the final configuration.37Note that the reversal operation is optional for each of the38sub-trains.39</p>40<!-- end en only -->41 42<!-- begin en only -->43<p>44For example, if the arrival configuration is "abcd", the train45is split into two sub-trains of either 3:1, 2:2 or 1:3 cars.46For each of the splitting, possible final configurations are47as follows ("+" indicates final concatenation position):48</p>49<!-- end en only -->50<pre>  [3:1]51    abc+d  cba+d  d+abc  d+cba52  [2:2]53    ab+cd  ab+dc  ba+cd  ba+dc  cd+ab  cd+ba  dc+ab  dc+ba54  [1:3]55    a+bcd  a+dcb  bcd+a  dcb+a56</pre>57<p>58<!-- begin en only -->59Excluding duplicates, 12 distinct configurations are possible.60</p>61<!-- end en only -->62 63<!-- begin en only -->64<p>65Given an arrival configuration, answer 66the number of distinct configurations which can be67constructed using the exchange lines described above.68</p>69<!-- end en only -->70 71 72<h2>Input</h2>73 74 75<!-- begin en only -->76<p>The entire input looks like the following.</p>77<blockquote>78<i>the number of datasets = m</i><br>79<i>1st dataset</i>                 <br>80<i>2nd dataset</i>                 <br>81...                                <br>82<i>m-th dataset</i>                <br>83</blockquote>84<p>85Each dataset represents an arriving train, and is a string of862 to 72 lowercase letters in an input line.87</p>88<!-- end en only -->89 90 91<h2>Output</h2>92 93<!-- begin en only -->94<p>95For each dataset, output the number of possible train configurations96in a line.  No other characters should appear in the output.97</p>98<!-- end en only -->99 100 101<h2>Sample Input</h2>102 103<pre>1044105aa106abba107abcd108abcde109</pre>110 111 112<h2>Output for the Sample Input</h2>113 114<pre>115111661171211818119</pre>