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
p00864.html137 linesDownload Raw Back to problem_descriptions
1 2<H1><font color="#000">Problem A:</font> Grey Area</H1>3 4 5 6<p>7Dr. Grey is a data analyst, who visualizes various aspects of data received from all over the8world everyday. He is extremely good at sophisticated visualization tools, but yet his favorite is9a simple self-made histogram generator.10</p>11 12<p>13Figure 1 is an example of histogram automatically produced by his histogram.14</p>15 16<center>17<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_greyarea1">18</center>19 20<p>21A histogram is a visual display of frequencies of value occurrences as bars. In this example, values22in the interval 0-9 occur five times, those in the interval 10-19 occur three times, and 20-2923and 30-39 once each.24</p>25<p>26Dr. Grey’s histogram generator is a simple tool. First, the height of the histogram is fixed, that27is, the height of the highest bar is always the same and those of the others are automatically28adjusted proportionately. Second, the widths of bars are also fixed. It can only produce a29histogram of uniform intervals, that is, each interval of a histogram should have the same width30(10 in the above example). Finally, the bar for each interval is painted in a grey color, where31the colors of the leftmost and the rightmost intervals are black and white, respectively, and the32darkness of bars monotonically decreases at the same rate from left to right. For instance, in33Figure 1, the darkness levels of the four bars are 1, 2/3, 1/3, and 0, respectively.34 35</p>36 37<p>38In this problem, you are requested to estimate ink consumption when printing a histogram on paper. The amount of ink necessary to draw a bar is proportional to both its area and darkness.39 40<H2>Input</H2>41 42<p>43The input consists of multiple datasets, each of which contains integers and specifies a value44table and intervals for the histogram generator, in the following format.45</p>46 47<p>48<i>n</i>  <i>w</i><br>49<i>v<sub>1</sub></i><br>50<i>v<sub>2</sub></i><br>51.<br>52.<br>53<i>v<sub>n</sub></i><br>54</p>55 56<p>57<i>n</i> is the total number of value occurrences for the histogram, and each of the <i>n</i> lines following58the first line contains a single value. Note that the same value may possibly occur multiple59times.60</p>61 62<p>63<i>w</i> is the interval width. A value <i>v</i> is in the first (i.e. leftmost) interval if 0 &le; <i>v</i> &lt; <i>w</i>, the second64one if <i>w</i> &le; <i>v</i> &lt; 2<i>w</i>, and so on. Note that the interval from 0 (inclusive) to <i>w</i> (exclusive) should65be regarded as the leftmost even if no values occur in this interval. The last (i.e. rightmost)66interval is the one that includes the largest value in the dataset.67</p>68 69<p>70You may assume the following.71</p>72 73<p>74                                  1 &le; <i>n</i> &le; 100<br>75                                  10 &le; <i>w</i> &le; 50<br>76                                  0 &le; <i>v<sub>i</sub></i> &le; 100 for 1 &le; i &le; <i>n</i><br>77</p>78 79<p>80You can also assume that the maximum value is no less than <i>w</i>. This means that the histogram81has more than one interval.82The end of the input is indicated by a line containing two zeros.83</p>84 85<H2>Output</H2>86 87<p>88For each dataset, output a line containing the amount of ink consumed in printing the histogram.89</p>90 91<p>92One unit of ink is necessary to paint one highest bar black. Assume that 0.01 units of ink per93histogram is consumed for various purposes except for painting bars such as drawing lines and94characters (see Figure 1). For instance, the amount of ink consumed in printing the histogram95in Figure 1 is:96</p>97 98<center>99<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_greyarea2">100</center>101 102<p>103Each output value should be in a decimal fraction and may have an error less than 10<sup>-5</sup> .104</p>105 106<H2>Sample Input</H2>107<pre>1083 5010910011001111001123 501131001141001155011610 101171118211931204121512216123171241812529126301270 0128</pre>129 130<H2>Output for the Sample Input</H2>131<pre>1320.511330.261341.4766666666666667135</pre>136 137