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
p00980.html105 linesDownload Raw Back to problem_descriptions
1<h2>Estimating the Flood Risk</h2>2 3<p>4  Mr. Boat is the owner of a vast extent of land. As many typhoons have struck Japan this year, he became concerned of flood risk of his estate and he wants to know the average altitude of his land. The land is too vast to measure the altitude at many spots. As no steep slopes are in the estate, he thought that it would be enough to measure the altitudes at only a limited number of sites and then approximate the altitudes of the rest based on them.5</p>6 7<p>8  Multiple approximations might be possible based on the same measurement results, in which case he wants to know the worst case, that is, one giving the lowest average altitude.9</p>10 11<p>12  Mr. Boat’s estate, which has a rectangular shape, is divided into grid-aligned rectangular areas of the same size. Altitude measurements have been carried out in some of these areas, and the measurement results are now at hand. The altitudes of the remaining areas are to be approximated on the assumption that altitudes of two adjoining areas sharing an edge differ at most 1.13</p>14 15<p>16  In the first sample given below, the land is divided into 5 &times; 4 areas. The altitudes of the areas at (1, 1) and (5, 4) are measured 10 and 3, respectively. In this case, the altitudes of all the areas are uniquely determined on the assumption that altitudes of adjoining areas differ at most 1.17</p>18 19<p>20  In the second sample, there are multiple possibilities, among which one that gives the lowest average altitude should be considered.21</p>22 23<p>24In the third sample, no altitude assignments satisfy the assumption on altitude differences.25</p>26 27<center>28<img src="https://judgeapi.u-aizu.ac.jp/resources/images/ICPCAsia2019_estimating_the_flood_risk" width="640"/>29</center>30 31<p>32  Your job is to write a program that approximates the average altitude of his estate. To be precise, the program should compute the total of approximated and measured altitudes of all the mesh-divided areas. If two or more different approximations are possible, the program should compute the total with the severest approximation, that is, one giving the lowest total of the altitudes.33</p>34 35<h3>Input</h3>36<p>37  The input consists of a single test case of the following format.38</p>39 40<pre>41$w$ $d$ $n$42$x_1$ $y_1$ $z_1$43.44.45.46$x_n$ $y_n$ $z_n$47</pre>48 49<p>50Here, $w$, $d$, and $n$ are integers between $1$ and $50$, inclusive. $w$ and $d$ are the numbers of areas in the two sides of the land. $n$ is the number of areas where altitudes are measured. The $i$-th line of the following $n$ lines contains three integers, $x_i$, $y_i$, and $z_i$ satisfying $1 \leq x_i \leq w$, $1 \leq y_i \leq d$, and $−100 \leq  z_i \leq 100$. They mean that the altitude of the area at $(x_i51, y_i)$ was measured to be $z_i$. At most one measurement result is given for the same area, i.e., for $i \ne j$, $(x_i, y_i) \ne (x_j , y_j)$.52</p>53 54 55<h3>Output</h3>56 57<p>58  If all the unmeasured areas can be assigned their altitudes without any conflicts with the measured altitudes assuming that two adjoining areas have the altitude difference of at most 1, output an integer that is the <i>total</i> of the measured or approximated altitudes of all the areas. If more than one such altitude assignment is possible, output the minimum altitude total among the possible assignments.59</p>60 61<p>62  If no altitude assignments satisfy the altitude difference assumption, output <span>No</span>.63</p>64 65<h3>Sample Input 1 </h3>66<pre>675 4 2681 1 10695 4 370</pre>71<h3>Sample Output 1</h3>72<pre>7313074</pre>75<h3>Sample Input 2 </h3>76<pre>775 4 3782 2 0794 3 0805 1 281</pre>82<h3>Sample Output 2</h3>83<pre>84-1485</pre>86<h3>Sample Input 3 </h3>87<pre>883 3 2891 1 8903 3 391</pre>92<h3>Sample Output 3</h3>93<pre>94No95</pre>96<h3>Sample Input 4 </h3>97<pre>982 2 1991 1 -100100</pre>101<h3>Sample Output 4</h3>102<pre>103-404104</pre>105