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 J:</font> Cheating on ICPC</H1>3 4<p>5 Peter loves any kinds of cheating. A week before ICPC, he broke into Doctor's PC and sneaked a look at all the problems that would be given in ICPC. He solved the problems, printed programs out, and brought into ICPC. Since electronic preparation is strictly prohibited, he had to type these programs again during the contest.6</p>7<p>8 9 Although he believes that he can solve every problems thanks to carefully debugged programs, he still has to find an optimal strategy to make certain of his victory.10</p>11<p>12 Teams are ranked by following rules.13</p>14 15 16<ol>17 <li> Team that solved more problems is ranked higher.</li>18 <li> In case of tie (solved same number of problems), team that received less Penalty is ranked higher.</li>19</ol>20 21 22<p>23 Here, Penalty is calculated by these rules.24</p>25 26 27<ol>28 <li> When the team solves a problem, time that the team spent to solve it (i.e. (time of submission) - (time of beginning of the contest)) are added to penalty.</li>29 <li> For each submittion that doesn't solve a problem, 20 minutes of Penalty are added. However, if the problem wasn't solved eventually, Penalty for it is not added.</li>30</ol>31 32 33<p>34 You must find that order of solving will affect result of contest. For example, there are three problem named A, B, and C, which takes 10 minutes, 20 minutes, and 30 minutes to solve, respectively. If you solve A, B, and C in this order, Penalty will be 10 + 30 + 60 = 100 minutes. However, If you do in reverse order, 30 + 50 + 60 = 140 minutes of Penalty will be given.35</p>36<p>37 Peter can easily estimate time to need to solve each problem (actually it depends only on length of his program.) You, Peter's teammate, are asked to calculate minimal possible Penalty when he solve all the problems.38</p>39 40<H2>Input</H2>41 42<p>43Input file consists of multiple datasets. The first line of a dataset is non-negative integer N (0 ≤ N ≤ 100) which stands for number of problem. Next N Integers P[1], P[2], ..., P[N] (0 ≤ P[i] ≤ 10800) represents time to solve problems.44</p>45<p>46 Input ends with EOF. The number of datasets is less than or equal to 100.<!--when N = 0. You should output nothing in this case.-->47 48</p>49 50<H2>Output</H2>51 52<p>53Output minimal possible Penalty, one line for one dataset.54</p>55 56<H2>Sample Input</H2>57<pre>5835910 20 306076156 26 62 43 25 80 762</pre>63 64<H2>Output for the Sample Input</H2>65<pre>661006787368</pre>69 