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="#000000">Problem E:</font> Twirl Around</h1>3 4<!-- begin en only -->5<p>6Let's think about a bar rotating clockwise as if it were a7twirling baton moving on a planar surface surrounded by a8polygonal wall (see Figure 1).9</p>10<!-- end en only -->11 12<!-- <img src="https://judgeapi.u-aizu.ac.jp/resources/images/rot_triangle" /><br /> -->13<center>14<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_e2" />15<br />16<!-- begin en only -->17<p>Figure 1. A bar rotating in a polygon</p>18<!-- end en only -->19</center>20 21 22<!-- begin en only -->23<p>24Initially, an end of the bar (called "end A") is at (0,0), and25the other end (called "end B") is at (0,<I>L</I>) where <I>L</I> is the26length of the bar. Initially, the bar is touching the wall only27at the end A.28</p>29<!-- end en only -->30 31<!-- begin en only -->32<p>33The bar turns fixing a touching point as the center.34The center changes as a new point touches the wall.35</p>36<!-- end en only -->37 38<!-- begin en only -->39<p>40Your task is to calculate the coordinates of the end A when the41bar has fully turned by the given count <I>R</I>.42</p>43<!-- end en only -->44 45 46 47<center>48<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_e5" />49<br />50<!-- begin en only -->51<p>Figure 2. Examples of turning bars</p>52<!-- end en only -->53</center>54 55<!-- begin en only -->56<p>In Figure 2, some examples are shown. In cases (D) and57(E), the bar is stuck prematurely (cannot rotate clockwise anymore 58with any point touching the wall as the center)59before <i>R</i> rotations. In such cases, you should answer the60coordinates of the end A in that (stuck) position.</p>61<!-- end en only -->62 63<!-- begin en only -->64<p>You can assume the following:</p>65<blockquote>66<p>67When the bar's length <i>L</i> changes by ε (|ε| <680.00001), the final (<i>x</i>,<i>y</i>) coordinates69will not change more than 0.0005.70</p>71</blockquote>72<!-- end en only -->73 74 75 76<h3>Input</h3>77 78 79<!-- begin en only -->80 81<p>The input consists of multiple datasets. The number of82datasets is no more than 100. The end of the input is represented83by "0 0 0".</p>84<!-- end en only -->85 86 87<!-- begin en only -->88<p>89The format of each dataset is as follows:90</p>91<!-- end en only -->92 93<pre>94<i>L</i> <i>R</i> <i>N</i>95<i>X</i><sub>1</sub> <i>Y</i><sub>1</sub>96<i>X</i><sub>2</sub> <i>Y</i><sub>2</sub>97...98<i>X</i><sub>N</sub> <i>Y</i><sub>N</sub>99</pre>100 101<!-- begin en only -->102<p>103<i>L</i> is the length of the bar.104The bar rotates 2π× <i>R</i> radians (if it is not105stuck prematurely).106<i>N</i> is the number of vertices which make the polygon.107</p>108 109<p>110The vertices of the polygon are arranged in a counter-clockwise order.111You may assume that the polygon is <em>simple</em>, that is,112its border never crosses or touches itself.113</p>114 115<p>116<i>N</i>, <i>X</i><sub>i</sub> and <i>Y</i><sub>i</sub> are117integer numbers; <i>R</i> and <i>L</i> are decimal fractions.118Ranges of those values are as follows:119</p>120<!-- end en only -->121 122<pre>1231.0 ≤ <i>L</i> ≤ 500.0,1241.0 ≤ <i>R</i> ≤ 10.0,1253 ≤ <i>N</i> ≤ 100,126-1000 ≤ <i>X</i><sub>i</sub> ≤ 1000,127-1000 ≤ <i>Y</i><sub>i</sub> ≤ 1000,128</pre>129 130<pre>131<i>X</i><sub>1</sub> ≤ -1, <i>Y</i><sub>1</sub> = 0,132<i>X</i><sub>2</sub> ≥ 1, <i>Y</i><sub>2</sub> = 0.133</pre>134 135 136<h3>Output</h3>137 138<!-- begin en only -->139 140<p>141For each dataset, print one line containing <i>x-</i> and142<i>y-</i>coordinates of the final position of the end A,143separated by a space.144The value may contain an error less than or equal to 0.001.145You may print any number of digits after the decimal point.146</p>147<!-- end en only -->148 149 150<h3>Sample Input</h3>151 152<pre>1534.0 2.0 8154-1 01555 01565 -21577 -21587 015918 016018 6161-1 61624.0 2.0 4163-1 016410 016510 12166-1 121674.0 1.0 7168-1 01692 0170-1 -3171-1 -81726 -81736 6174-1 61754.0 2.0 6176-1 017710 017810 31797 31807 5181-1 51825.0 2.0 6183-1 01842 01852 -41866 -41876 6188-1 61896.0 1.0 8190-1 01918 01927 21939 21948 419511 419611 12197-1 121980 0 0199</pre>200 201 202<h3>Output for the Sample Input</h3>203<pre>20416.0 0.02059.999999999999998 7.46410161513775352060.585786437626906 -5.4142135623730952078.0 0.02086.0 0.02099.52786404500042 4.0210</pre>211 212 213<!-- begin en only -->214<p>215Note that the above sample input corresponds to the216cases in Figure 2. For convenience, in Figure 3, we will show an217animation and corresponding photographic playback for the case (C).218</p>219<!-- end en only -->220 221<center>222<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_e6" />223<br />224 225<TABLE>226<TR><TD><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_stopMotion_Eframe0000"></TD>227 <TD><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_stopMotion_Eframe0045"></TD>228 <TD><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_stopMotion_Eframe0090"></TD>229 <TD><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_stopMotion_Eframe0135"></TD>230 <TD><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_stopMotion_Eframe0180"></TD>231 <TD><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_stopMotion_Eframe0225"></TD>232 <TD><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_stopMotion_Eframe0270"></TD>233 <TD><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_stopMotion_Eframe0315"></TD>234 <TD><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_stopMotion_EframeLast"></TD></TR>235</TABLE>236 237<!-- begin en only -->238<p>Figure 3. Animation and photographic playback for case (C)</p>239<!-- end en only -->240</center>241 242 243 244 