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<H1>Area of Polygons</H1>3 4<p>5Polygons are the most fundamental objects in geometric processing.6Complex figures are often represented and handled as polygons7with many short sides.8If you are interested in the processing of geometric data,9you'd better try some programming exercises about basic10operations on polygons.11</p>12 13<p>14Your job in this problem is to write a program that computes the area of polygons.15</p>16 17<p>18A polygon is represented by a sequence of points that are its vertices.19If the vertices p<SUB>1</SUB>, p<SUB>2</SUB>, ..., p<SUB>n</SUB> are given, line segments connecting20p<SUB>i</SUB> and p<SUB>i+1</SUB> (1 <= i <= n-1) are sides of the polygon.21The line segment connecting p<SUB>n</SUB> and p<SUB>1</SUB> is also a side of the polygon.22</p>23 24<p>25You can assume that the polygon is not degenerate.26Namely, the following facts can be assumed without any input data checking.27</p>28 29<UL>30<LI>No point will occur as a vertex more than once.</LI>31<LI>Two sides can intersect only at a common endpoint (vertex).</LI>32<LI>The polygon has at least 3 vertices.</LI>33</UL>34 35<p>36Note that the polygon is not necessarily convex.37In other words, an inner angle may be larger than 180 degrees.38</p>39 40<H2>Input</H2>41 42<P>The input contains multiple data sets, each representing a polygon.43A data set is given in the following format.</P>44 45<PRE>46 n47 x1 y148 x2 y249 ...50 xn yn51</PRE>52 53<P>The first integer n is the number of vertices,54such that 3 <= n <= 50.55The coordinate of a vertex p<SUB>i</SUB> is given by (x<SUB>i</SUB>, y<SUB>i</SUB>).56x<SUB>i</SUB> and y<SUB>i</SUB> are integers between 0 and 1000 inclusive.57The coordinates of vertices are given in the order58of clockwise visit of them.</P>59 60<P>The end of input is indicated by a data set with 0 as the value of n.</P>61 62<H2>Output</H2>63 64<P>For each data set, your program should output its sequence number65(1 for the first data set, 2 for the second, etc.) and the area of the polygon separated by a single space. The area should be printed with one digit to the right of the decimal point.</P>66 67<P>The sequence number and the area should be printed on the same line.68Since your result is checked by an automatic grading program,69you should not insert any extra characters nor lines on the output.70</P>71 72<H2>Sample Input</H2>73<pre>743751 1763 4776 078 797800 08110 10820 208310 30840 4085100 4086100 087 88089</pre>90 91<H2>Output for the Sample Input</H2>92<pre>931 8.5942 3800.095</pre>96 97 98 