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
p00391.html83 linesDownload Raw Back to problem_descriptions
1<h1>Treasure Map</h1>2<p>3  Mr. Kobou found a bundle of old paper when he was cleaning his family home. On each paper, two series of numbers are written. Strange as it appeared to him, Mr. Kobou further went through the storehouse and found out a note his ancestor left. According to it, the bundle of paper is a treasure map, in which the two sequences of numbers seem to give a clue to the whereabouts of the treasure the ancestor buried.4</p>5 6<p>7  Mr. Kobou’s ancestor divided the area where he buried his treasure in a reticular pattern and used only some of the grid sections. The two series of numbers indicate the locations: the $i$-th member of the first series indicates the number of locations in the $i$-th column (form left) of the grid sections where a part of the treasure is buried, and the $j$-th member of the second indicates the same information regarding the $j$-th row from the top. No more than one piece of treasure is buried in one grid section. An example of a 5 &times; 4 case is shown below. If the pieces of treasure are buried in the grid sections noted as "<span>#</span>" the two series of numbers become "0,2,2,1,1" and "1,1,1,3".8</p>9 10<center>11  <table border="1" style="border-collapse: collapse" cellpadding="8">12    <tr>13      <td> </td><td>0</td><td>2</td><td>2</td><td>1</td><td>1</td>14    </tr>15    <tr>16      <td>1</td><td> </td><td> </td><td>#</td><td> </td><td> </td>17    </tr>18    <tr>19      <td>1</td><td> </td><td>#</td><td> </td><td> </td><td> </td>20    </tr>21    <tr>22      <td>1</td><td> </td><td> </td><td> </td><td> </td><td>#</td>23    </tr>24    <tr>25      <td>3</td><td> </td><td>#</td><td>#</td><td>#</td><td> </td>26    </tr>27  </table>28</center>29<br/>30 31<p>32Mr. Kobou’s ancestor seems to be a very careful person. He slipped some pieces of paper with completely irrelevant information into the bundle. For example, a set of number series "3,2,3,0,0" and "4,2,0,0,2" does not match any combination of 5 &times; 5 matrixes. So, Mr. Kobou has first to exclude these pieces of garbage information.33</p>34 35<p>36  Given the set of information written on the pieces of paper, make a program to judge if the information is relevant.37</p>38 39<h2>Input</h2>40<p>41  The input is given in the following format.42</p>43<pre>44$W$ $H$45$a_1$ $a_2$ $...$ $a_W$46$b_1$ $b_2$ $...$ $b_H$ 47</pre>48 49<p>50The first line provides the number of horizontal partitions $W$ ($1 \leq W \leq 1000$) and vertical partitions $H$ ($1 \leq H \leq 1000$). The second line provides the $i$-th member of the first number series $a_i$ ($0 \leq a_i \leq H$) written on the paper, and the third line the $j$-th member of the second series $b_j$ ($0 \leq b_j \leq W$).51  52</p>53 54<h2>Output</h2>55<p>56  Output "<span>1</span>" if the information written on the paper is relevant, or "<span>0</span>" otherwise.57</p>58 59 60<h2>Sample Input 1 </h2>61<pre>625 4630 2 2 1 1641 1 1 365</pre>66 67<h2>Sample Output 1</h2>68<pre>69170</pre>71 72<h2>Sample Input 2</h2>73<pre>745 5753 2 3 0 0764 2 0 0 277</pre>78 79<h2>Sample Output 2</h2>80<pre>810 82</pre>83