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
p00805.html93 linesDownload Raw Back to problem_descriptions
1 2<H1><font color="#000">Problem C:</font> Fishnet</H1>3 4<p>5A fisherman named Etadokah awoke in a very small island. He could see calm, beautiful and blue sea around the island. The previous night he had encountered a terrible storm and had reached this uninhabited island. Some wrecks of his ship were spread around him. He found a square wood-frame and a long thread among the wrecks. He had to survive in this island until someone came and saved him.6</p>7<p>8In order to catch fish, he began to make a kind of fishnet by cutting the long thread into short threads and fixing them at pegs on the square wood-frame (Figure 1). He wanted to know the sizes of the meshes of the fishnet to see whether he could catch small fish as well as large ones.9</p>10<p>11The wood-frame is perfectly square with four thin edges one meter long.. a bottom edge, a top edge, a left edge, and a right edge. There are <i>n</i> pegs on each edge, and thus there are 4<i>n</i> pegs in total. The positions ofpegs are represented by their (<i>x</i>, <i>y</i>)-coordinates. Those of an example case with <i>n</i> = 2 are depicted in Figures 2 and 3. The position of the <i>i</i>th peg on the bottom edge is represented by (<i>a<sub>i</sub></i>, 0) . That on the top edge, on the left edge and on the right edge are represented by (<i>b<sub>i</sub></i>, 1) , (0, <i>c<sub>i</sub></i>), and (1, <i>d<sub>i</sub></i>), respectively. The long thread is cut into 2<i>n</i> threads with appropriate lengths. The threads are strained between (<i>a<sub>i</sub></i>, 0) and (<i>b<sub>i</sub></i>, 1) , and between (0, <i>c<sub>i</sub></i>) and (1, <i>d<sub>i</sub></i>) (<i>i</i> = 1,..., <i>n</i>) .12</p>13<p>14You should write a program that reports the size of the largest mesh among the (<i>n</i> + 1)<sup>2</sup> meshes of the fishnet made by fixing the threads at the pegs. You may assume that the thread he found is long enough to make the fishnet and that the wood-frame is thin enough for neglecting its thickness. 15</p>16 17<center>18<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_fishnet1">19<p>Figure 1. A wood-frame with 8 pegs.</p>20</center>21 22<center>23<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_fishnet2">24<p>Figure 2. Positions of pegs (indicated by small black circles)</p>25</center>26 27<center>28<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_fishnet3">29<p>Figure 3. A fishnet and the largest mesh (shaded)</p>30</center>31 32<H2>Input</H2>33 34<p>35The input consists of multiple subproblems followed by a line containing a zero that indicates the end of input. Each subproblem is given in the following format.36</p>37<pre>38<i>n</i>39<i>a</i><sub>1</sub><i>a</i><sub>2</sub> ... <i>a<sub>n</sub></i>40<i>b</i><sub>1</sub><i>b</i><sub>2</sub> ... <i>b<sub>n</sub></i>41<i>c</i><sub>1</sub><i>c</i><sub>2</sub> ... <i>c<sub>n</sub></i>42<i>d</i><sub>1</sub><i>d</i><sub>2</sub> ... <i>d<sub>n</sub></i>43</pre>44<p>45An integer <i>n</i> followed by a newline is the number of pegs on each edge. <i>a</i><sub>1</sub>,..., <i>a<sub>n</sub></i>, <i>b</i><sub>1</sub>,..., <i>b<sub>n</sub></i>, <i>c</i><sub>1</sub>,..., <i>c<sub>n</sub></i>, <i>d</i><sub>1</sub>,..., <i>d<sub>n</sub></i> are decimal fractions, and they are separated by a space character except that <i>a<sub>n</sub></i>, <i>b<sub>n</sub></i>, <i>c<sub>n</sub></i> and <i>d<sub>n</sub></i> are followed by a new line. Each <i>a<sub>i</sub></i> (<i>i</i> = 1,..., <i>n</i>) indicates the <i>x</i>-coordinate of the <i>i</i>th peg on the bottom edge. Each <i>b<sub>i</sub></i> (<i>i</i> = 1,..., <i>n</i>) indicates the <i>x</i>-coordinate of the <i>i</i>th peg on the top edge. Each <i>c<sub>i</sub></i> (<i>i</i> = 1,..., <i>n</i>) indicates the <i>y</i>-coordinate of the <i>i</i>th peg on the left edge. Each <i>d<sub>i</sub></i> (<i>i</i> = 1,..., <i>n</i>) indicates the <i>y</i>-coordinate of the <i>i</i>th peg on the right edge. The decimal fractions are represented by 7 digits after the decimal point. In addition you may assume that 0 &lt; <i>n</i> &le; 30 , 0 &lt; <i>a</i><sub>1</sub> &lt; <i>a</i><sub>2</sub> &lt; ... &lt; <i>a<sub>n</sub></i> &lt; 1, 0 &lt; <i>b</i><sub>1</sub> &lt; <i>b</i><sub>2</sub> &lt; ... &lt; <i>b<sub>n</sub></i> &lt; 1 , 0 &lt; <i>c</i><sub>1</sub> &lt; <i>c</i><sub>2</sub> &lt; ... &lt; <i>c<sub>n</sub></i> &lt; 1 and 0 &lt; <i>d</i><sub>1</sub> &le; <i>d</i><sub>2</sub> &lt; ... &lt; <i>d<sub>n</sub></i> &lt; 1 . 46</p>47 48<H2>Output</H2>49 50<p>51For each subproblem, the size of the largest mesh should be printed followed by a new line. Each value should be represented by 6 digits after the decimal point, and it may not have an error greater than 0.000001.52</p>53 54<H2>Sample Input</H2>55<pre>562570.2000000 0.6000000580.3000000 0.8000000590.3000000 0.5000000600.5000000 0.6000000612620.3333330 0.6666670630.3333330 0.6666670640.3333330 0.6666670650.3333330 0.6666670664670.2000000 0.4000000 0.6000000 0.8000000680.1000000 0.5000000 0.6000000 0.9000000690.2000000 0.4000000 0.6000000 0.8000000700.1000000 0.5000000 0.6000000 0.9000000712720.5138701 0.9476283730.1717362 0.1757412740.3086521 0.7022313750.2264312 0.5345343761770.4000000780.6000000790.3000000800.500000081082</pre>83 84<H2>Output for the Sample Input</H2>85<pre>860.215657870.111112880.078923890.279223900.34895891</pre>92 93