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
p00910.html159 linesDownload Raw Back to problem_descriptions
1 2<H1><font color="#000">Problem G: </font>Let There Be Light</H1>3 4<p>5Suppose that there are some light sources and many spherical balloons. All light sources have sizes small enough to be modeled as point light sources, and they emit light in all directions. The surfaces of the balloons absorb light and do not reflect light. Surprisingly in this world, balloons may overlap.6</p>7 8<p>9You want the total illumination intensity at an objective point as high as possible. For this purpose, some of the balloons obstructing lights can be removed. Because of the removal costs, however, there is a certain limit on the number of balloons to be removed. Thus, you would like to remove an appropriate set of balloons so as to maximize the illumination intensity at the objective point.10</p>11 12<p>13The following figure illustrates the configuration specified in the first dataset of the sample input given below. The figure shows the <i>xy</i>-plane, which is enough because, in this dataset, the <i>z</i>-coordinates of all the light sources, balloon centers, and the objective point are zero. In the figure, light sources are shown as stars and balloons as circles. The objective point is at the origin, and you may remove up to 4 balloons. In this case, the dashed circles in the figure correspond to the balloons to be removed.14</p>15 16<center>17<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_letThereBeLight">18<p>19Figure G.1: First dataset of the sample input.20</p>21</center>22 23<H2>Input</H2>24 25<p>26The input is a sequence of datasets. Each dataset is formatted as follows.27</p>28 29<p>30<i>N M R</i><br/>31<i>S</i><sub>1<i>x</i></sub> <i>S</i><sub>1<i>y</i></sub> <i>S</i><sub>1<i>z</i></sub> <i>S</i><sub>1<i>r</i></sub><br/>32...<br/>33<i>S</i><sub><i>Nx</i></sub> <i>S</i><sub><i>Ny</i></sub> <i>S</i><sub><i>Nz</i></sub> <i>S</i><sub><i>Nr</i></sub><br/>34<i>T</i><sub>1<i>x</i></sub> <i>T</i><sub>1<i>y</i></sub> <i>T</i><sub>1<i>z</i></sub> <i>T</i><sub>1<i>b</i></sub><br/>35...<br/>36<i>T</i><sub><i>Mx</i></sub> <i>T</i><sub><i>My</i></sub> <i>T</i><sub><i>Mz</i></sub> <i>T</i><sub><i>Mb</i></sub><br/>37<i>E<sub>x</sub> E<sub>y</sub> E<sub>z</sub></i><br/>38</p>39 40<p>41The first line of a dataset contains three positive integers, <i>N</i>, <i>M</i> and <i>R</i>, separated by a single space. <i>N</i> means the number of balloons that does not exceed 2000. <i>M</i> means the number of light sources that does not exceed 15. <i>R</i> means the number of balloons that may be removed, which does not exceed <i>N</i>.42</p>43 44<p>45Each of the <i>N</i> lines following the first line contains four integers separated by a single space. (<i>S<sub>ix</sub></i>, <i>S<sub>iy</sub></i>, <i>S<sub>iz</sub></i>) means the center position of the <i>i</i>-th balloon and <i>S<sub>ir</sub></i> means its radius.46</p>47 48<p>49Each of the following <i>M</i> lines contains four integers separated by a single space. (<i>T<sub>jx</sub></i>, <i>T<sub>jy</sub></i>, <i>T<sub>jz</sub></i>) means the position of the <i>j</i>-th light source and <i>T<sub>jb</sub></i> means its brightness.50</p>51 52<p>53The last line of a dataset contains three integers separated by a single space. (<i>E<sub>x</sub></i>, <i>E<sub>y</sub></i>, <i>E<sub>z</sub></i>) means the position of the objective point.54</p>55 56<p>57<i>S<sub>ix</sub></i>, <i>S<sub>iy</sub></i>, <i>S<sub>iz</sub></i>, <i>T<sub>jx</sub></i>, <i>T<sub>jy</sub></i>, <i>T<sub>jz</sub></i>, <i>E<sub>x</sub></i>, <i>E<sub>y</sub></i> and <i>E<sub>z</sub></i> are greater than -500, and less than 500. <i>S<sub>ir</sub></i> is greater than 0, and less than 500. <i>T<sub>jb</sub></i> is greater than 0, and less than 80000.58</p>59 60<p>61At the objective point, the intensity of the light from the <i>j</i>-th light source is in inverse proportion to the square of the distance, namely62</p>63 64<p style="text-align:center">65<i>T<sub>jb</sub></i> / { (<i>T<sub>jx</sub></i> &minus; <i>E<sub>x</sub></i>)<sup>2</sup> + (<i>T<sub>jy</sub></i> &minus; <i>E<sub>y</sub></i>)<sup>2</sup> + (<i>T<sub>jz</sub></i> &minus; <i>E<sub>z</sub></i>)<sup>2</sup> }, 66</p>67 68<p>69if there is no balloon interrupting the light. The total illumination intensity is the sum of the above.70</p>71 72<p>73You may assume the following.74</p>75 76<ol>77<li> The distance between the objective point and any light source is not less than 1.</li>78<li> For every <i>i</i> and <i>j</i>, even if <i>S<sub>ir</sub></i> changes by &epsilon; (|&epsilon;| &lt; 0.01), whether the <i>i</i>-th balloon hides the <i>j</i>-th light or not does not change.79</ol>80 81<p>82The end of the input is indicated by a line of three zeros.83</p>84 85 86 87<H2>Output</H2>88 89<p>90For each dataset, output a line containing a decimal fraction which means the highest possible illumination intensity at the objective point after removing <i>R</i> balloons. The output should not contain an error greater than 0.0001.91</p>92 93 94<H2>Sample Input</H2>95<pre>9612 5 4970 10 0 1981 5 0 2991 4 0 21000 0 0 210110 0 0 11023 -1 0 21035 -1 0 210410 10 0 151050 -10 0 110610 -10 0 1107-10 -10 0 110810 10 0 11090 10 0 24011010 0 0 20011110 -2 0 52112-10 0 0 1001131 1 0 21140 0 011512 5 41160 10 0 11171 5 0 21181 4 0 21190 0 0 212010 0 0 11213 -1 0 21225 -1 0 212310 10 0 151240 -10 0 112510 -10 0 1126-10 -10 0 112710 10 0 11280 10 0 26012910 0 0 20013010 -2 0 52131-10 0 0 1001321 1 0 21330 0 01345 1 31351 2 0 2136-1 8 -1 8137-2 -3 5 6138-2 1 3 3139-4 2 3 51401 1 2 71410 0 01425 1 21431 2 0 2144-1 8 -1 8145-2 -3 5 6146-2 1 3 3147-4 2 3 51481 1 2 71490 0 01500 0 0151</pre>152 153<H2>Output for the Sample Input</H2>154<pre>1553.51563.61571.16666666666666671580.0159</pre>