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><font color="#000">Problem C:</font>Mobile Phone Coverage</H1>3 4<p>5A mobile phone company ACMICPC (Advanced Cellular, Mobile, and Internet-Connected Phone Corporation) is planning to set up a collection of antennas for mobile phones in a city called Maxnorm. The company ACMICPC has several collections for locations of antennas as their candidate plans, and now they want to know which collection is the best choice.6</p>7 8<p>9for this purpose, they want to develop a computer program to find the coverage of a collection of antenna locations. Each antenna <i>A<sub>i</sub></i> has power <i>r<sub>i</sub></i>, corresponding to "radius". Usually, the coverage region of the antenna may be modeled as a disk centered at the location of the antenna (<i>x<sub>i</sub>, y<sub>i</sub></i>) with radius <i>r<sub>i</sub></i>. However, in this city Maxnorm such a coverage region becomes the square [<i>x<sub>i</sub></i> − <i>r<sub>i</sub></i>, <i>x<sub>i</sub></i> + <i>r<sub>i</sub></i>] × [<i>y<sub>i</sub></i> − <i>r<sub>i</sub></i>, <i>y<sub>i</sub></i> + <i>r<sub>i</sub></i>]. In other words, the distance between two points (<i>x<sub>p</sub></i>, <i>y<sub>p</sub></i>) and (<i>x<sub>q</sub></i>, <i>y<sub>q</sub></i>) is measured by the max norm max{ |<i>x<sub>p</sub></i> − <i>x<sub>q</sub></i>|, |<i>y<sub>p</sub></i> − <i>y<sub>q</sub></i>|}, or, the <i>L</i><sub>∞</sub> norm, in this city Maxnorm instead of the ordinary Euclidean norm √ {(<i>x<sub>p</sub></i> − <i>x<sub>q</sub></i>)<sup>2</sup> + (<i>y<sub>p</sub></i> − <i>y<sub>q</sub></i>)<sup>2</sup>}.10</p>11 12<p>13As an example, consider the following collection of 3 antennas14</p>15 16<pre>174.0 4.0 3.0185.0 6.0 3.0195.5 4.5 1.020</pre>21 22<p>depicted in the following figure</p>23 24<center>25<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_mobilePhone">26</center>27 28<p>29where the <i>i</i>-th row represents <i>x<sub>i</sub>, y<sub>i</sub> r<sub>i</sub></i> such that (<i>x<sub>i</sub>, y<sub>i</sub></i>) is the position of the <i>i</i>-th antenna and <i>r<sub>i</sub></i> is its power. The area of regions of points covered by at least one antenna is 52.00 in this case.30</p>31 32<p>33Write a program that finds the area of coverage by a given collection of antenna locations.34</p>35 36 37<H2>Input</H2>38 39<p>40The input contains multiple data sets, each representing a collection of antenna locations. A data set is given in the following format.41</p>42 43<pre>44<i>45n46x<sub>1</sub> y<sub>1</sub> r<sub>1</sub>47x<sub>2</sub> y<sub>2</sub> r<sub>2</sub>48. . .49x<sub>n</sub> y<sub>n</sub> r<sub>n</sub>50</i>51</pre>52 53 54<p>55The first integer <i>n</i> is the number of antennas, such that 2 ≤ <i>n</i> ≤ 100. The coordinate of the <i>i</i>-th antenna is given by (<i>x<sub>i</sub>, y<sub>i</sub></i>), and its power is <i>r<sub>i</sub></i>. <i>x<sub>i</sub>, y<sub>i</sub></i> and <i>r<sub>i</sub></i> are fractional numbers between 0 and 200 inclusive.56</p>57 58<p>59The end of the input is indicated by a data set with 0 as the value of <i>n</i>.60</p>61 62<H2>Output</H2>63 64<p>65For each data set, your program should output its sequence number (1 for the first data set, 2 for the second, etc.) and the area of the coverage region. The area should be printed with two digits to the right of the decimal point, after rounding it to two decimal places.66</p>67 68<p>69The sequence number and the area should be printed on the same line with no spaces at the beginning and end of the line. The two numbers should be separated by a space.70</p>71 72<H2>Sample Input</H2>73<pre>743754.0 4.0 3.0765.0 6.0 3.0775.5 4.5 1.0782793.0 3.0 3.0801.5 1.5 1.081082</pre>83 84<H2>Output for the Sample Input</H2>85<pre>861 52.00872 36.0088</pre>89 90 