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<script type="text/x-mathjax-config">3 MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});4</script>5<script type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>6</script>7 8 9<h2>Problem C10Distribution Center11</h2>12 13<p>14The factory of the Impractically Complicated Products Corporation has many manufacturing lines and the same number of corresponding storage rooms. The same number of conveyor lanes are laid out in parallel to transfer goods from manufacturing lines directly to the corresponding storage rooms. Now, they plan to install a number of robot arms here and there between pairs of adjacent conveyor lanes so that goods in one of the lanes can be picked up and released down on the other, and also in the opposite way. This should allow mixing up goods from different manufacturing lines to the storage rooms.15</p>16 17<p>18Depending on the positions of robot arms, the goods from each of the manufacturing lines can only be delivered to some of the storage rooms. Your task is to find the number of manufacturing lines from which goods can be transferred to each of the storage rooms, given the number of conveyor lanes and positions of robot arms.19</p>20 21 22<h3>Input</h3>23<p>24The input consists of a single test case, formatted as follows.<br/>25<br/>26$n$ $m$<br/>27$x_1$ $y_1$<br/>28...<br/>29$x_m$ $y_m$<br/>30</p>31 32<p>33An integer $n$ ($2 \leq n \leq 200000$) in the first line is the number of conveyor lanes. The lanes are numbered from 1 to $n$, and two lanes with their numbers differing with 1 are adjacent. All of them start from the position $x = 0$ and end at $x = 100000$. The other integer $m$ ($1 \leq m < 100000$) is the number of robot arms.34</p>35 36<p>37The following $m$ lines indicate the positions of the robot arms by two integers $x_i$ ($0 < x_i < 100000$) and $y_i$ ($1 \leq y_i < n$). Here, $x_i$ is the <i>x</i>-coordinate of the $i$-th robot arm, which can pick goods on either the lane $y_i$ or the lane $y_i + 1$ at position $x = x_i$, and then release them on the other at the same <i>x</i>-coordinate.38</p>39 40<p>41You can assume that positions of no two robot arms have the same $x$-coordinate, that is, $x_i \ne x_j$ for any $i \ne j$.42</p>43 44<center>45<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_ICPCAsia2016_Figure_C1"><br/>46Figure C.1. Illustration of Sample Input 147</center><br/>48 49 50<h3>Output</h3>51 52<p>53Output $n$ integers separated by a space in one line. The $i$-th integer is the number of the manufacturing lines from which the storage room connected to the conveyor lane $i$ can accept goods.54</p>55 56 57 58<h3>Sample Input 1</h3>59 60<pre>4 3611000 1622000 2633000 3</pre>64 65<h3>Sample Output 1</h3>66 67<pre>2 3 4 4</pre>68 69<br/>70 71<h3>Sample Input 2</h3>72 73<pre>4 3741 1753 2762 3</pre>77 78<h3>Sample Output 2</h3>79 80<pre>2 4 4 2</pre>81 