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
p00640.html149 linesDownload Raw Back to problem_descriptions
1 2<H1><font color="#000000">Problem D:</font> Distorted Love</H1>3 4<p>5Saying that it is not surprising that people want to know about their love, she has checked up his address, name, age, phone number, hometown, medical history, political party and even his sleeping position, every piece of his personal information. The word "privacy" is not in her dictionary. A person like her is called "stoker" or "<i>yandere</i>", but it doesn't mean much to her.6</p>7 8 9<p>10To know about him, she set up spyware to his PC. This spyware can record his mouse operations while he is browsing websites. After a while, she could successfully obtain the record from the spyware in absolute secrecy.11</p>12 13<p>14Well, we want you to write a program which extracts web pages he visited from the records.15</p>16 17<p>18All pages have the same size <i>H</i> &times; <i>W</i> where upper-left corner is (0, 0) and lower right corner is (<i>W</i>, <i>H</i>). A page includes several (or many) rectangular buttons (parallel to the page). Each button has a link to another page, and when a button is clicked the browser leads you to the corresponding page.19</p>20 21 22<p>23His browser manages history and the current page in the following way:24</p>25 26<p>27The browser has a buffer of 1-dimensional array with enough capacity to store pages, and a pointer to indicate a page in the buffer. A page indicated by the pointer is shown on the browser. At first, a predetermined page is stored and the pointer indicates that page. When the link button is clicked, all pages recorded in the right side from the pointer are removed from the buffer. Then, the page indicated by the link button is stored into the right-most position of the buffer, and the pointer moves to right. As a result, the user browse the page indicated by the button.28</p>29 30<p>31The browser also has special buttons 'back to the previous page' (back button) and 'forward to the next page' (forward button). When the user clicks the back button, the pointer moves to left, and the user clicks the forward button, the pointer moves to right. But in both cases, if there are no such pages in the buffer, nothing happen.32</p>33 34<p>35The record consists of the following operations:36</p>37 38<pre>39click x y40</pre>41 42<p>43It means to click (<i>x</i>, <i>y</i>). If there is a button on the point (<i>x</i>, <i>y</i>), he moved to the corresponding page. If there is nothing in the point, nothing happen. The button is clicked if <i>x</i>1 &le; <i>x</i> &le; <i>x</i>2 and <i>y</i>1 &le; <i>y</i> &le; <i>y</i>2 where <i>x</i>1, <i>x</i>2 means the leftmost and rightmost coordinate and <i>y</i>1, <i>y</i>2 means the topmost and bottommost coordinate of the corresponding button respectively.44</p>45 46<pre>47back48</pre>49 50<p>51It means to click the Back button.52</p>53 54<pre>55forward56</pre>57 58<p>59It means to click the Forward button.60</p>61 62<p>63In addition, there is a special operation <span>show</span>. Your program should print the name of current page for each <span>show</span> operation.64</p>65 66 67<p>68By the way, setting spyware into computers of others may conflict with the law. Do not attempt, or you will be reprimanded by great men.69</p>70 71 72<H2>Input</H2>73 74<p>75Input consists of several datasets.76</p>77 78<p>79Each dataset starts with an integer <i>n</i> which represents the number of pages in the dataset.80</p>81 82<p>83Next line contains two integers <i>W</i> and <i>H</i>.84</p>85 86<p>87Next, information of each page are given. Each page starts with a string of characters and <i>b</i>[<i>i</i>], the number of buttons the page has. Following <i>b</i>[<i>i</i>] lines give information of buttons. Each button consists of four integers representing the coordinate (<i>x</i>1, <i>y</i>1) of upper left corner and the coordinate (<i>x</i>2, <i>y</i>2) of lower right corner of the button and a string of characters, which represents the name of page that the link of the button represents.88</p>89 90<p>91Next, the number of operation <i>m</i> is given. Following <i>m</i> lines represent the record of operations. Please see the above description for the operation.92</p>93 94<p>95The first page is stored in the buffer at first.96</p>97 98<p>99Input ends when <i>n</i> = 0.100</p>101 102<H2>Output</H2>103 104<p>105For each dataset, output the name of current page for each <span>show</span> operation.106</p>107 108<H2>Constraints</H2>109 110<ul>111<li>1 &le; <i>n</i> &le; 100</li>112<li><i>b</i>[<i>i</i>] &le; 100</li>113<li>1 &le; the number of characters in the name &le; 20</li>114<li>Buttons are not touch, overlapped nor run over from the browser.</li>115</ul>116 117<H2>Sample Input</H2>118<pre>1193120800 600121index 1122500 100 700 200 profile123profile 2124100 100 400 200 index125100 400 400 500 link126link 1127100 100 300 200 index1289129click 600 150130show131click 200 450132show133back134back135show136forward137show1380139</pre>140 141<H2>Output for the Sample Input</H2>142<pre>143profile144link145index146profile147</pre>148 149