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
p00884.html141 linesDownload Raw Back to problem_descriptions
1 2<H1><font color="#000">Problem A:</font> Membership Management</H1>3 4<p>5Peter is a senior manager of Agile Change Management (ACM) Inc., where each employee is a member of one or more task groups. Since ACM is agile, task groups are often reorganized and their members frequently change, so membership management is his constant headache.6</p>7 8<p>9Peter updates the membership information whenever any changes occur: for instance, the following line written by him means that Carol and Alice are the members of the Design Group.10</p>11 12<pre>13design:carol,alice.14</pre>15 16<p>17The name preceding the colon is the group name and the names following it specify its members.18</p>19 20<p>21A smaller task group may be included in a larger one. So, a group name can appear as a member of another group, for instance, as follows. 22</p>23 24<pre>25development:alice,bob,design,eve.26</pre>27 28<p>29Simply unfolding the design above gives the following membership specification, which is equivalent to the original.30</p>31 32<pre>33development:alice,bob,carol,alice,eve.34</pre>35 36<p>37In this case, however, alice occurs twice. After removing one of the duplicates, we have the following more concise specification.38</p>39 40<pre>41development:alice,bob,carol,eve.42</pre>43 44<p>45Your mission in this problem is to write a program that, given group specifications, identifies group members.46</p>47 48<p>49Note that Peter's specifications can include deeply nested groups. In the following, for instance, the group one contains a single member dave.50</p>51 52<pre>53one:another.54another:yetanother.55yetanother:dave.56</pre>57 58 59<H2>Input</H2>60 61<p>62The input is a sequence of datasets, each being in the following format.63</p>64 65<p>66<i>n</i><br>67<i>group</i><sub>1</sub><span>:</span><i>member</i><sub>1,1</sub>,...,<i>member</i><sub>1,<i>m</i><sub>1</sub></sub><span>.</span><br>68<span>.</span><br>69<span>.</span><br>70<span>.</span><br>71<i>group</i><sub><i>i</i></sub><span>:</span><i>member</i><sub><i>i</i>,1</sub>,...,<i>member</i><sub><i>i</i>,<i>m</i><sub><i>i</i></sub></sub><span>.</span><br>72<span>.</span><br>73<span>.</span><br>74<span>.</span><br>75<i>group</i><sub><i>n</i></sub><span>:</span><i>member</i><sub><i>n</i>,1</sub>,...,<i>member</i><sub><i>n</i>,<i>m</i><sub><i>n</i></sub></sub><span>.</span><br>76</p>77 78<p>79The first line contains n, which represents the number of groups and is a positive integer no more than 100. Each of the following n lines contains the membership information of a group: <i>group</i><sub><i>i</i></sub> (1 &le; <i>i</i> &le; <i>n</i>) is the name of the <i>i</i>-th task group and is followed by a colon (<span>:</span>) and then the list of its <i>m<sub>i</sub></i> member s that are delimited by a comma (<span>,</span>) and terminated by a period (<span>.</span>).80</p>81 82<p>83Those group names are mutually different. Each <i>m<sub>i</sub></i> (1 &le; <i>i</i> &le; <i>n</i>) is between 1 and 10, inclusive. A <i>member</i> is another group name if it is one of <i>group</i><sub>1</sub>, <i>group</i><sub>2</sub>,..., or groupn. Otherwise it is an employee name.84</p>85 86<p>87There are no circular (or recursive) definitions of group(s). You may assume that <i>m<sub>i</sub></i> member names of a group are mutually different.88</p>89 90<p>91Each group or employee name is a non-empty character string of length between 1 and 15, inclusive, and consists of lowercase letters.92</p>93 94<p>95The end of the input is indicated by a line containing a zero.96</p>97 98 99<H2>Output</H2>100 101<p>102For each dataset, output the number of employees included in the first group of the dataset, that is <i>group</i><sub>1</sub>, in a line. No extra characters should occur in the output.103</p>104 105<H2>Sample Input</H2>106<pre>1072108development:alice,bob,design,eve.109design:carol,alice.1103111one:another.112another:yetanother.113yetanother:dave.1143115friends:alice,bob,bestfriends,carol,fran,badcompany.116bestfriends:eve,alice.117badcompany:dave,carol.1185119a:b,c,d,e.120b:c,d,e,f.121c:d,e,f,g.122d:e,f,g,h.123e:f,g,h,i.1244125aa:bb.126cc:dd,ee.127ff:gg.128bb:cc.1290130</pre>131 132<H2>Output for the Sample Input</H2>133<pre>13441351136613741382139</pre>140 141