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
p00970.html118 linesDownload Raw Back to problem_descriptions
1<h2>Emergency Evacuation</h2>2 3<p>4  The Japanese government plans to increase the number of inbound tourists to forty million in the year 2020, and sixty million in 2030. Not only increasing touristic appeal but also developing tourism infrastructure further is indispensable to accomplish such numbers.5</p>6 7<p>8  One possible enhancement on transport is providing cars extremely long and/or wide, carrying many passengers at a time. Too large a car, however, may require too long to evacuate all passengers in an emergency. You are requested to help estimating the time required.9</p>10 11<p>12  The car is assumed to have the following seat arrangement.13</p>14 15<ul>16<li> A center aisle goes straight through the car, directly connecting to the emergency exit door at the rear center of the car.</li>17<li> The rows of the same number of passenger seats are on both sides of the aisle.</li>18</ul>19										     20<p>21  A rough estimation requested is based on a simple step-wise model. All passengers are initially on a distinct seat, and they can make one of the following moves in each step.22</p>23 24<ul>25<li> Passengers on a seat can move to an adjacent seat toward the aisle. Passengers on a seat adjacent to the aisle can move sideways directly to the aisle.</li>26<li> Passengers on the aisle can move backward by one row of seats. If the passenger is in front of the emergency exit, that is, by the rear-most seat rows, he/she can get off the car.</li>27</ul>28 29<p>30  The seat or the aisle position to move to must be empty; either no other passenger is there before the step, or the passenger there empties the seat by moving to another position in the same step. When two or more passengers satisfy the condition for the same position, only one of them can move, keeping the others wait in their original positions.31</p>32 33<p>34  The leftmost figure of Figure C.1 depicts the seat arrangement of a small car given in Sample Input 1. The car have five rows of seats, two seats each on both sides of the aisle, totaling twenty. The initial positions of seven passengers on board are also shown.35</p>36 37<p>38  The two other figures of Figure C.1 show possible positions of passengers after the first and the second steps. Passenger movements are indicated by fat arrows. Note that, two of the passengers in the front seat had to wait for a vacancy in the first step, and one in the second row had to wait in the next step.39</p>40 41<p>42  Your task is to write a program that gives the smallest possible number of steps for all the passengers to get off the car, given the seat arrangement and passengers' initial positions.43</p>44 45<div style="text-align:center">46  <img width="680" src="https://judgeapi.u-aizu.ac.jp/resources/images/ICPCAsia2018_emergencyEvacuation"><br/>47  Figure C.148  </div>49     50<h3>Input</h3>51<p>52  The input consists of a single test case of the following format.53</p>54 55<pre>56$r$ $s$ $p$57$i_1$ $j_1$58...59$i_p$ $j_p$60</pre>61 62<p>63  Here, $r$ is the number of passenger seat rows, $s$ is the number of seats on each side of the aisle, and $p$ is the number of passengers. They are integers satisfying $1 \leq r \leq 500$, $1 \leq  s \leq 500$, and $1 \leq p \leq 2rs$.64</p>65 66<p>67  The following $p$ lines give initial seat positions of the passengers. The $k$-th line with $i_k$ and $j_k$ means that the $k$-th passenger's seat is in the $i_k$-th seat row and it is the $j_k$-th seat on that row. Here, rows and seats are counted from front to rear and left to right, both starting from one. They satisfy $1 \leq i_k \leq r$ and $1 \leq j_k \leq 2s$. Passengers are on distinct seats, that is, $i_k \ne= i_l$ or $j_k \ne j_l$ holds if $k \ne l$.68</p>69 70<h3>Output</h3>71<p>72The output should be one line containing a single integer, the minimum number of steps required73for all the passengers to get off the car.74</p>75 76 77<h3>Sample Input 1</h3>78<pre>795 2 7801 1811 2821 3832 3842 4854 4865 287</pre>88<h3>Sample Output 1</h3>89<pre>90991</pre>92 93<h3>Sample Input 2</h3>94<pre>95500 500 16961 1971 2981 999991 10001002 11012 21022 9991032 10001043 11053 21063 9991073 1000108499 500109499 501110499 999111499 1000112</pre>113<h3>Sample Output 2</h3>114<pre>1151008116</pre>117 118