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: [["$","$"], ["\\(","\\)"]], skipTags: ["script","noscript","style","textarea","code"], processEscapes: true }});4</script>5<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML"></script>6 7<h2>Problem D8 Making Perimeter of the Convex Hull Shortest9 </h2>10 11<p>12 The convex hull of a set of three or more planar points is, when not all of them are on one line, the convex polygon with the smallest area that has all the points of the set on its boundary or in its inside. Your task is, given positions of the points of a set, to find how much shorter the perimeter of the convex hull can be made by excluding <i>two</i> points from the set.13</p>14 15<p>16 The figures below correspond to the three cases given as Sample Input 1 to 3. Encircled points are excluded to make the shortest convex hull depicted as thick dashed lines.17</p>18<table>19 <tr>20 <td><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_ICPCAsia2017_convexHullShortest1" width="240"></td>21 <td><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_ICPCAsia2017_convexHullShortest2" width="240"></td>22 <td><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_ICPCAsia2017_convexHullShortest3" width="240"></td>23 </tr>24 <tr>25 <td style="text-align:center">Sample Input 1</td>26 <td style="text-align:center">Sample Input 2</td>27 <td style="text-align:center">Sample Input 3</td>28 29 </tr>30</table>31 32<h3>Input</h3>33<p>34 The input consists of a single test case in the following format.35</p>36<pre>37$n$38$x_1$ $y_1$39...40$x_n$ $y_n$41</pre>42 43<p>44 Here, $n$ is the number of points in the set satisfying $5 \leq n \leq 10^5$. For each $i$, ($x_i, y_i$) gives the coordinates of the position of the $i$-th point in the set. $x_i$ and $y_i$ are integers between $-10^6$ and $10^6$, inclusive. All the points in the set are distinct, that is, $x_j \ne x_k$ or $y_j \ne y_k$ holds when $j \ne k$. It is guaranteed that no single line goes through $n - 2$ or more points in the set.45 </p>46 47<h3>Output</h3>48 49<p>50 Output the difference of the perimeter of the convex hull of the original set and the shortest of the perimeters of the convex hulls of the subsets with two points excluded from the original set. The output should not have an error greater than $10^{-4}$.51</p>52 53 54<h3>Sample Input 1</h3>55<pre>561057-53 6258-19 5859-11 1160-9 -226145 -76237 -396347 -5864-2 4165-37 106613 4267</pre>68 69<h3>Sample Output 1</h3>70<pre>7172.9631692872</pre>73 74<h3>Sample Input 2</h3>75<pre>761077-53 6278-19 5879-11 1180-9 -228145 -78243 -478347 -5884-2 4185-37 108613 4287</pre>88 89<h3>Sample Output 2</h3>90<pre>9162.6294799292</pre>93 94<h3>Sample Input 3</h3>95<pre>961097-53 6298-35 4799-11 11100-9 -2210145 -710243 -4710347 -58104-2 41105-37 1010613 42107</pre>108 109<h3>Sample Output 3</h3>110<pre>11161.58166534112</pre>