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
p00832.html177 linesDownload Raw Back to problem_descriptions
1<H1><font color="#000">Problem F:</font> Dice Puzzle</H1>2 3<p>4Let’s try a dice puzzle. The rules of this puzzle are as follows.5</p>6 7<ol>8 9<li>10Dice with six faces as shown in Figure 1 are used in the puzzle.11 12<br><br>13<center>14<img src="https://judgeapi.u-aizu.ac.jp/resources/images/dicePuzzle1">15<p>Figure 1: Faces of a die</p>16</center>17</li>18 19<li>20With twenty seven such dice, a 3 &times; 3 &times; 3 cube is built as shown in Figure 2.21 22<br><br>23<center>24  <img src="https://judgeapi.u-aizu.ac.jp/resources/images/dicePuzzle2">25<p>Figure 2: 3 &times; 3 &times; 3 cube</p>26</center>27</li>28 29<li>30When building up a cube made of dice, the sum of the numbers marked on the faces of adjacent dice that are placed against each other must be seven (See Figure 3). For example, if one face of the pair is marked “2”, then the other face must be “5”.31<br><br>32<center>33    <img src="https://judgeapi.u-aizu.ac.jp/resources/images/dicePuzzle3">34<p>Figure 3: A pair of faces placed against each other</p>35</center>36 37</li>38 39 40<li>41The top and the front views of the cube are partially given, i.e. the numbers on faces of42some of the dice on the top and on the front are given.43 44<br><br>45<center>46  <img src="https://judgeapi.u-aizu.ac.jp/resources/images/dicePuzzle4">47<p>Figure 4: Top and front views of the cube</p>48</center>49</li>50 51 52<li>53The goal of the puzzle is to find all the plausible dice arrangements that are consistent54with the given top and front view information.55</li>56 57</ol>58 59<p>60Your job is to write a program that solves this puzzle.61</p>62 63 64<H2>Input</H2>65 66<p>67The input consists of multiple datasets in the following format.68</p>69<pre>70       <i>N</i>71       <i>Dataset</i><sub>1</sub>72       <i>Dataset</i><sub>2</sub>73       ...74       <i>Dataset<sub>N</sub></i>75</pre>76<p>77<i>N</i> is the number of the datasets.78</p>79<p>80The format of each dataset is as follows.81</p>82 83<pre>84<i>T</i><sub>11</sub> <i>T</i><sub>12</sub> <i>T</i><sub>13</sub>85<i>T</i><sub>21</sub> <i>T</i><sub>22</sub> <i>T</i><sub>23</sub>86<i>T</i><sub>31</sub> <i>T</i><sub>32</sub> <i>T</i><sub>33</sub>87<i>F</i><sub>11</sub> <i>F</i><sub>12</sub> <i>F</i><sub>13</sub>88<i>F</i><sub>21</sub> <i>F</i><sub>22</sub> <i>F</i><sub>23</sub>89<i>F</i><sub>31</sub> <i>F</i><sub>32</sub> <i>F</i><sub>33</sub>90</pre>91<p>92<i>T<sub>ij</sub></i> and <i>F<sub>ij</sub></i> (1 &le; <i>i</i> &le; 3, 1 &le; <i>j</i> &le; 3) are the faces of dice appearing on the top and front views,93as shown in Figure 2, or a zero. A zero means that the face at the corresponding position is94unknown.95</p>96 97<H2>Output</H2>98 99<p>100For each plausible arrangement of dice, compute the sum of the numbers marked on the nine101faces appearing on the right side of the cube, that is, with the notation given in Figure 2,102 103&sum;<sup>3</sup><sub><i>i</i>=1</sub>&sum;<sup>3</sup><sub><i>j</i>=1</sub><i>R<sub>ij</sub></i>.104</p>105 106 107<p>108For each dataset, you should output the right view sums for all the plausible arrangements, in109ascending order and without duplicates. Numbers should be separated by a single space.110</p>111<p>112When there are no plausible arrangements for a dataset, output a zero.113</p>114<p>115For example, suppose that the top and the front views are given as follows.116</p>117 118<center>119  <img src="https://judgeapi.u-aizu.ac.jp/resources/images/dicePuzzle5">120<p>Figure 5: Example</p>121</center>122 123<p>There are four plausible right views as shown in Figure 6. The right view sums are 33, 36, 32,124and 33, respectively. After rearranging them into ascending order and eliminating duplicates,125the answer should be “32 33 36”.126</p>127 128<center>129 130  <img src="https://judgeapi.u-aizu.ac.jp/resources/images/dicePuzzle6">131 132<p>Figure 6: Plausible right views</p>133</center>134 135<p>136The output should be one line for each dataset. The output may have spaces at ends of lines.137</p>138 139<H2>Sample Input</H2>140<pre>14141421 1 11431 1 11441 1 11452 2 21462 2 21472 2 21484 3 31495 2 21504 3 31516 1 11526 1 11536 1 01541 0 01550 2 01560 0 01575 1 21585 1 21590 0 01602 0 01610 3 01620 0 01630 0 01640 0 01653 0 1166</pre>167 168<H2>Output for the Sample Input</H2>169<pre>170271712417232 33 361730174</pre>175 176 177