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<h3>ICPC Ranking</h3>3 4<p>5Your mission in this problem is to write a program6which, given the submission log of an ICPC (International Collegiate Programming Contest),7determines team rankings.8</p>9 10<p>11The log is a sequence of records of program submission12in the order of submission.13A record has four fields: elapsed time, team number,14problem number, and judgment.15The elapsed time is the time elapsed from the beginning of the contest16to the submission.17The judgment field tells whether the submitted program was18correct or incorrect, and when incorrect,19what kind of an error was found.20</p>21 22<p>23The team ranking is determined according to the following rules.24Note that the rule set shown here is one used in the real ICPC World Finals and Regionals,25with some detail rules omitted for simplification.26</p>27 28<ol>29<li>30Teams that solved more problems are ranked higher.31</li>32 33<li>34Among teams that solve the same number of problems, 35ones with smaller total consumed time are ranked higher.36 37</li>38 39<li>40If two or more teams solved the same number of problems, and their41total consumed times are the same, they are ranked the same.42</li>43 44</ol>45 46<p>47The total consumed time is the sum of the consumed time for each problem solved.48The consumed time for a solved problem is the elapsed time 49of the accepted submission plus 20 penalty minutes for every previously rejected submission for that problem.50</p>51 52<p>53If a team did not solve a problem, the consumed time for the problem is zero, and thus even if there are several incorrect submissions, no penalty is given.54</p>55 56<p>57You can assume that a team never submits a program for a problem58after the correct submission for the same problem.59</p>60 61<h3>Input</h3>62 63 64<p>65The input is a sequence of datasets each in the following format.66The last dataset is followed by a line with four zeros.67</p>68 69<blockquote>70<i>M</i> <i>T</i> <i>P</i> <i>R</i> <br>71<i>m</i><sub>1</sub> <i>t</i><sub>1</sub> <i>p</i><sub>1</sub> <i>j</i><sub>1</sub> <br>72<i>m</i><sub>2</sub> <i>t</i><sub>2</sub> <i>p</i><sub>2</sub> <i>j</i><sub>2</sub> <br>73..... <br>74<i>m<sub>R</sub></i> <i>t<sub>R</sub></i> <i>p<sub>R</sub></i> <i>j<sub>R</sub></i> <br>75</blockquote>76 77<p>78The first line of a dataset contains four integers79<i>M</i>, <i>T</i>, <i>P</i>, and <i>R</i>.80<i>M</i> is the duration of the contest.81<i>T</i> is the number of teams.82<i>P</i> is the number of problems.83<i>R</i> is the number of submission records.84The relations 85120 ≤ <i>M</i> ≤ 300,861 ≤ <i>T</i> ≤ 50,871 ≤ <i>P</i> ≤ 10,88and 0 ≤ <i>R</i> ≤ 200089hold for these values.90Each team is assigned a team number between 1 and <i>T</i>, inclusive.91Each problem is assigned a problem number between 1 and <i>P</i>, inclusive.92</p>93 94<p>95Each of the following <i>R</i> lines contains a submission record96with four integers97<i>m<sub>k</sub></i>, <i>t<sub>k</sub></i>,98<i>p<sub>k</sub></i>, and <i>j<sub>k</sub></i>99(1 ≤ <i>k</i> ≤ <i>R</i>).100<i>m<sub>k</sub></i> is the elapsed time.101<i>t<sub>k</sub></i> is the team number.102<i>p<sub>k</sub></i> is the problem number.103<i>j<sub>k</sub></i> is the judgment104(0 means correct, and other values mean incorrect).105The relations1060 ≤ <i>m<sub>k</sub></i> ≤ <i>M</i>−1,1071 ≤ <i>t<sub>k</sub></i> ≤ <i>T</i>,1081 ≤ <i>p<sub>k</sub></i> ≤ <i>P</i>,109and 0 ≤ <i>j<sub>k</sub></i> ≤ 10110hold for these values.111</p>112 113<p>114The elapsed time fields are rounded off to the nearest minute.115</p>116 117<p>118Submission records are given in the order of submission.119Therefore, if <i>i</i> < <i>j</i>,120the <i>i</i>-th submission is done before the <i>j</i>-th submission121(<i>m<sub>i</sub></i> ≤ <i>m<sub>j</sub></i>).122In some cases, you can determine the ranking of two teams123with a difference less than a minute, by using this fact.124However, such a fact is never used in the team ranking.125Teams are ranked only using time information in minutes.126</p>127 128 129<h3>Output</h3>130 131<p>132For each dataset, your program should output team numbers (from 1 to <i>T</i>),133higher ranked teams first.134The separator between two team numbers should be a comma.135When two teams are ranked the same, the separator between them136should be an equal sign.137Teams ranked the same should be listed138in decreasing order of their team numbers.139</p>140 141 142<h3>Sample Input</h3>143<pre>144300 10 8 514550 5 2 114670 5 2 014775 1 1 0148100 3 1 0149150 3 2 0150240 5 5 715150 1 1 015260 2 2 015370 2 3 015490 1 3 0155120 3 5 0156140 4 1 0157150 2 4 1158180 3 5 415915 2 2 116020 2 2 116125 2 2 016260 1 1 0163120 5 5 416415 5 4 116520 5 4 016640 1 1 016740 2 2 0168120 2 3 416930 1 1 017040 2 1 017150 2 2 017260 1 2 0173120 3 3 21740 1 1 01751 2 2 0176300 5 8 01770 0 0 0178</pre>179 180<h3>Output for the Sample Input</h3>181<pre>1823,1,5,10=9=8=7=6=4=21832,1,3,4,51841,2,31855=2=1,4=31862=11871,2,31885=4=3=2=1189</pre>190 