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 I10 Skinny Polygon 11</h2>12 13<p>14You are asked to find a polygon that satisfies all the following conditions, given two integers, $x_{bb}$ and $y_{bb}$.15</p>16<ul>17 <li> The number of vertices is either 3 or 4.</li>18 <li> Edges of the polygon do not intersect nor overlap with other edges, i.e., they do not share any points with other edges except for their endpoints.</li>19 <li> The $x$- and $y$-coordinates of each vertex are integers. </li>20 <li> The $x$-coordinate of each vertex is between 0 and $x_{bb}$, inclusive. Similarly, the $y$-coordinate is between 0 and $y_{bb}$, inclusive.</li>21 <li> At least one vertex has its $x$-coordinate 0.</li>22 <li> At least one vertex has its $x$-coordinate $x_{bb}$.</li>23 <li> At least one vertex has its $y$-coordinate 0.</li>24 <li> At least one vertex has its $y$-coordinate $y_{bb}$.</li>25 <li> <b>The area of the polygon does not exceed 25000.</b></li>26</ul>27 28<p>29 The polygon may be non-convex.30 </p>31 32 33<h3>Input</h3>34 35<p>36 The input consists of multiple test cases. The first line of the input contains an integer $n$, which is the number of the test cases ($1 \leq n \leq 10^5$). Each of the following $n$ lines contains a test case formatted as follows.<br/>37 <br/>38 $x_{bb}$ $y_{bb}$<br/>39 <br/>40 $x_{bb}$ and $y_{bb}$ ($2 \leq x_{bb} \leq 10^9, 2 \leq y_{bb} \leq 10^9$) are integers stated above.41 </p>42 43 44 45<h3>Output</h3>46 47<p>48 For each test case, output description of one polygon satisfying the conditions stated above, in the following format.<br/>49 <br/>50$v$<br/>51$x_1$ $y_1$<br/>52. <br/>53. <br/>54. <br/>55$x_v$ $y_v$<br/>56</p>57 58<p>59Here, $v$ is the number of vertices, and each pair of $x_i$ and $y_i$ gives the coordinates of the $i$-th vertex, $(x_i, y_i)$. The first vertex $(x_1, y_1)$ can be chosen arbitrarily, and the rest should be listed either in clockwise or in counterclockwise order.60</p>61 62<p>63When more than one polygon satisfies the conditions, any one of them is acceptable. You can prove that, with the input values ranging as stated above, there is at least one polygon satisfying the conditions.64</p>65 66<h3>Sample Input 1</h3>67 68<pre>2695 6701000000000 2</pre>71 72<h3>Sample Output 1</h3>73 74<pre>4755 6760 6770 0785 0793801000000000 0810 282999999999 0</pre>83 