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
p00968.html117 linesDownload Raw Back to problem_descriptions
1<h2>Digits Are Not Just Characters</h2>2 3<p>4  Mr. Manuel Majorana Minore made a number of files with numbers in their names. He wants to have a list of the files, but the file listing command commonly used lists them in an order different from what he prefers, interpreting digit sequences in them as ASCII code sequences, not as numbers. For example, the files <span>file10</span>, <span>file20</span> and <span>file3</span> are listed in this order.5</p>6 7<p>8Write a program which decides the orders of file names interpreting digit sequences as numeric9values.10</p>11 12<p>13  Each file name consists of uppercase letters (from '<span>A</span>' to '<span>Z</span>'), lowercase letters (from '<span>a</span>' to '<span>z</span>'), and digits (from '<span>0</span>' to '<span>9</span>').14</p>15 16<p>17A file name is looked upon as a sequence of items, each being either a letter or a number. Each18single uppercase or lowercase letter forms a letter item. Each consecutive sequence of digits forms a number item.19</p>20 21<p>22  Two item are ordered as follows.23</p>24 25<ul>26<li> Number items come before letter items.</li>27<li> Two letter items are ordered by their ASCII codes.</li>28<li> Two number items are ordered by their values when interpreted as decimal numbers.</li>29</ul>30 31<p>32  Two file names are compared item by item, starting from the top, and the order of the first different corresponding items decides the order of the file names. If one of them, say $A$, has more items than the other, $B$, and all the items of $B$ are the same as the corresponding items of $A$, $B$ should come before.33</p>34 35<p>36  For example, three file names in Sample Input 1, <span>file10</span>, <span>file20</span>, and <span>file3</span> all start with the same sequence of four letter items <span>f</span>, <span>i</span>, <span>l</span>, and <span>e</span>, followed by a number item, 10, 20, and 3, respectively. Comparing numeric values of these number items, they are ordered as <span>file3</span> $<$ <span>file10</span> $<$ <span>file20</span>.37</p>38 39 40<h3>Input</h3>41 42<p>43  The input consists of a single test case of the following format.44</p>45<pre>46$n$47$s_0$48$s_1$49:50$s_n$51</pre>52 53<p>54  The integer $n$ in the first line gives the number of file names ($s_1$ through $s_n$) to be compared with the file name given in the next line ($s_0$). Here, $n$ satisfies $1 \leq n \leq 1000$.55</p>56 57<p>58  The following $n + 1$ lines are file names, $s_0$ through $s_n$, one in each line. They have at least one and no more than nine characters. Each of the characters is either an uppercase letter, a lowercase letter, or a digit.59</p>60 61<p>62  Sequences of digits in the file names never start with a digit zero (0).63</p>64 65 66<h3>Output</h3>67 68<p>69  For each of the file names, $s_1$ through $s_n$, output one line with a character indicating whether it should come before $s_0$ or not. The character should be "<span>-</span>" if it is to be listed before $s_0$; otherwise, it should be "<span>+</span>", including cases where two names are identical.70</p>71 72<h3>Sample Input 1</h3>73<pre>74275file1076file2077file378</pre>79 80<h3>Sample Output 1</h3>81<pre>82+83-84</pre>85 86<h3>Sample Input 2</h3>87<pre>881189X52Y90X91X592X5293X52Y94X52Y6953296ABC97XYZ98x51y99X8Y100X222101</pre>102 103<h3>Sample Output 2</h3>104<pre>105-106-107-108+109+110-111-112+113+114-115+116</pre>117