Back
Close

Santa's problem

Statement

 Goal

Santa wants to deliver Christmas presents to all the children in the city of Rotten Pepper. Help him to find out how much time it will take him.

The biggest issue that he has is his big belly. If the width of the chimney is 80 centimetres or more, he needs only one minute to come down the chimney. But if the width of the chimney is less than 80 centimetres, Santa will get stuck and it will take him twice as long (two minutes).

Santa is also very picky. He only eats chocolate chip cookies(chocolate_chip_cookies) TOGETHER with hot milk(hot_milk). Nothing else. If he finds this combination by the fireplace it will make him very happy but cause another one minute delay.

His journey starts at destination one and finishes at his own house.
Input
Line 1: An integer H – number of destinations.
Next H lines:Two integers W and TWidth of the chimney (in centimetres) and Time (in minutes) that Santa needs to get to another destination or back home when all the presents are delivered.
Two strings F and D - The food and drink offered to Santa by the fireplace.
Output
One number without units. How many minutes it will take Santa to deliver all presents and get back home.
Constraints
5<H<200
30<W<120, without units
2<T<12, without units
Example
Input
4
104 7 gingerbread_cookies cofee        
43 5 sugar_cookies fresh_juice
48 8 gingerbread_cookies hot_milk      
58 6 chocolate_chip_cookies fresh_juice
Output
33

Game modes
Fastest

Test cases
Example Test
Input
4 104 7 gingerbread_cookies cofee 43 5 sugar_cookies fresh_juice 48 8 gingerbread_cookies hot_milk 58 6 chocolate_chip_cookies fresh_juice
Output
33

Easy Validator
Input
15 67 2 sugar_cookies coffee 103 4 peanut_butter_cookies coffee 77 4 peanut_butter_cookies cold_milk 60 11 sugar_cookies cold_milk 92 4 gingerbread_cookies cofee 81 6 brown_sugar_cookies cold_milk 67 3 peanut_butter_cookies coffee 119 3 gingerbread_cookies hot_milk 47 11 brown_sugar_cookies beer 109 6 brown_sugar_cookies beer 89 6 brown_sugar_cookies cold_milk 44 10 gingerbread_cookies hot_milk 105 11 brown_sugar_cookies coffee 101 2 sugar_cookies cold_milk 108 11 chocolate_chip_cookies coffee
Output
115

Medium Test
Input
76 59 10 gingerbread_cookies beer 89 4 peanut_butter_cookies coffee 81 2 brown_sugar_cookies coffee 114 2 gingerbread_cookies coffee 115 4 sugar_cookies coffee 70 9 chocolate_chip_cookies cold_milk 59 8 brown_sugar_cookies coffee 47 8 gingerbread_cookies cold_milk 54 11 gingerbread_cookies cold_milk 40 4 chocolate_chip_cookies coffee 97 3 brown_sugar_cookies cold_milk 104 3 brown_sugar_cookies fresh_juice 112 4 brown_sugar_cookies hot_milk 67 11 sugar_cookies hot_milk 72 6 sugar_cookies cold_milk 66 10 chocolate_chip_cookies hot_milk 54 5 gingerbread_cookies cold_milk 91 8 brown_sugar_cookies cold_milk 63 10 brown_sugar_cookies coffee 62 5 brown_sugar_cookies beer 101 6 gingerbread_cookies fresh_juice 67 11 sugar_cookies fresh_juice 30 6 gingerbread_cookies beer 31 5 chocolate_chip_cookies hot_milk 37 8 sugar_cookies coffee 87 9 brown_sugar_cookies cold_milk 58 6 brown_sugar_cookies hot_milk 91 3 gingerbread_cookies hot_milk 101 7 sugar_cookies cold_milk 86 8 peanut_butter_cookies beer 95 4 sugar_cookies coffee 116 10 gingerbread_cookies coffee 65 6 gingerbread_cookies beer 101 9 sugar_cookies cold_milk 115 7 chocolate_chip_cookies cold_milk 113 3 peanut_butter_cookies fresh_juice 84 10 gingerbread_cookies cold_milk 70 7 sugar_cookies cold_milk 108 4 chocolate_chip_cookies cold_milk 51 9 brown_sugar_cookies fresh_juice 55 9 brown_sugar_cookies hot_milk 109 9 gingerbread_cookies cold_milk 31 2 sugar_cookies beer 102 6 peanut_butter_cookies cold_milk 53 11 chocolate_chip_cookies beer 93 5 gingerbread_cookies beer 37 6 chocolate_chip_cookies coffee 92 11 sugar_cookies beer 75 11 chocolate_chip_cookies coffee 43 6 gingerbread_cookies cold_milk 38 10 gingerbread_cookies cold_milk 80 9 sugar_cookies fresh_juice 87 9 brown_sugar_cookies fresh_juice 32 6 chocolate_chip_cookies hot_milk 50 8 chocolate_chip_cookies coffee 91 4 brown_sugar_cookies coffee 63 4 brown_sugar_cookies cold_milk 66 4 peanut_butter_cookies fresh_juice 39 7 sugar_cookies coffee 117 10 brown_sugar_cookies hot_milk 84 9 brown_sugar_cookies hot_milk 73 2 peanut_butter_cookies hot_milk 96 7 sugar_cookies cold_milk 103 2 sugar_cookies hot_milk 32 9 sugar_cookies cold_milk 82 11 gingerbread_cookies fresh_juice 54 10 brown_sugar_cookies fresh_juice 108 10 chocolate_chip_cookies fresh_juice 91 10 sugar_cookies coffee 45 8 gingerbread_cookies fresh_juice 76 8 chocolate_chip_cookies cold_milk 55 11 chocolate_chip_cookies beer 73 2 sugar_cookies hot_milk 101 9 chocolate_chip_cookies coffee 36 11 brown_sugar_cookies coffee 85 7 peanut_butter_cookies beer
Output
657

More Houses Validator
Input
114 36 6 gingerbread_cookies cold_milk 87 9 sugar_cookies beer 101 4 peanut_butter_cookies hot_milk 87 9 peanut_butter_cookies fresh_juice 51 5 brown_sugar_cookies fresh_juice 118 8 peanut_butter_cookies cold_milk 86 11 chocolate_chip_cookies beer 92 5 brown_sugar_cookies beer 113 3 gingerbread_cookies beer 85 8 sugar_cookies beer 71 6 gingerbread_cookies fresh_juice 83 8 gingerbread_cookies cold_milk 65 11 gingerbread_cookies coffee 53 4 sugar_cookies hot_milk 41 7 chocolate_chip_cookies fresh_juice 38 2 peanut_butter_cookies cold_milk 100 6 sugar_cookies coffee 32 2 peanut_butter_cookies hot_milk 69 11 peanut_butter_cookies cold_milk 115 5 peanut_butter_cookies beer 94 5 peanut_butter_cookies hot_milk 66 5 peanut_butter_cookies hot_milk 60 6 gingerbread_cookies fresh_juice 67 5 brown_sugar_cookies cold_milk 59 6 brown_sugar_cookies beer 71 7 peanut_butter_cookies cold_milk 52 4 peanut_butter_cookies hot_milk 111 4 brown_sugar_cookies hot_milk 57 10 gingerbread_cookies fresh_juice 76 11 gingerbread_cookies beer 42 6 peanut_butter_cookies hot_milk 32 3 brown_sugar_cookies hot_milk 90 6 gingerbread_cookies hot_milk 58 2 peanut_butter_cookies coffee 42 6 peanut_butter_cookies fresh_juice 85 5 chocolate_chip_cookies hot_milk 116 9 brown_sugar_cookies cold_milk 40 2 peanut_butter_cookies hot_milk 30 9 chocolate_chip_cookies hot_milk 48 2 gingerbread_cookies fresh_juice 87 2 brown_sugar_cookies coffee 40 9 chocolate_chip_cookies cold_milk 88 4 chocolate_chip_cookies cold_milk 85 7 peanut_butter_cookies hot_milk 106 4 chocolate_chip_cookies hot_milk 33 3 peanut_butter_cookies fresh_juice 55 8 gingerbread_cookies coffee 117 2 chocolate_chip_cookies fresh_juice 45 11 gingerbread_cookies beer 88 5 peanut_butter_cookies beer 111 4 chocolate_chip_cookies cold_milk 39 10 peanut_butter_cookies coffee 51 9 gingerbread_cookies beer 117 3 brown_sugar_cookies coffee 33 6 peanut_butter_cookies coffee 51 5 gingerbread_cookies beer 38 9 chocolate_chip_cookies beer 105 2 brown_sugar_cookies fresh_juice 92 4 gingerbread_cookies cold_milk 80 3 gingerbread_cookies coffee 85 9 brown_sugar_cookies beer 56 9 sugar_cookies hot_milk 31 11 brown_sugar_cookies fresh_juice 97 6 sugar_cookies coffee 85 5 sugar_cookies hot_milk 110 7 chocolate_chip_cookies beer 90 2 sugar_cookies fresh_juice 111 6 chocolate_chip_cookies hot_milk 67 9 chocolate_chip_cookies cold_milk 41 6 peanut_butter_cookies beer 85 5 chocolate_chip_cookies beer 110 2 sugar_cookies fresh_juice 75 7 brown_sugar_cookies fresh_juice 89 7 chocolate_chip_cookies fresh_juice 68 7 chocolate_chip_cookies fresh_juice 98 5 peanut_butter_cookies hot_milk 104 7 peanut_butter_cookies fresh_juice 48 5 chocolate_chip_cookies fresh_juice 82 11 gingerbread_cookies coffee 40 7 sugar_cookies cold_milk 33 3 gingerbread_cookies fresh_juice 104 3 peanut_butter_cookies hot_milk 96 4 peanut_butter_cookies beer 92 11 sugar_cookies fresh_juice 61 4 peanut_butter_cookies beer 80 5 sugar_cookies beer 50 7 brown_sugar_cookies coffee 45 10 peanut_butter_cookies fresh_juice 117 3 sugar_cookies coffee 109 5 brown_sugar_cookies cold_milk 73 9 brown_sugar_cookies cold_milk 99 5 chocolate_chip_cookies coffee 118 3 peanut_butter_cookies fresh_juice 66 7 gingerbread_cookies cold_milk 99 11 gingerbread_cookies coffee 35 9 peanut_butter_cookies beer 78 3 peanut_butter_cookies coffee 99 10 brown_sugar_cookies hot_milk 113 2 sugar_cookies beer 30 6 chocolate_chip_cookies coffee 37 8 gingerbread_cookies fresh_juice 108 9 gingerbread_cookies cold_milk 96 8 gingerbread_cookies beer 55 6 brown_sugar_cookies cold_milk 105 11 chocolate_chip_cookies beer 49 5 sugar_cookies hot_milk 96 5 brown_sugar_cookies beer 82 11 sugar_cookies cold_milk 33 11 chocolate_chip_cookies fresh_juice 74 5 chocolate_chip_cookies cold_milk 69 9 chocolate_chip_cookies beer 101 11 peanut_butter_cookies coffee 65 7 brown_sugar_cookies cold_milk 55 8 chocolate_chip_cookies coffee
Output
896

MORE HOUSES Test
Input
173 66 9 sugar_cookies fresh_juice 36 11 peanut_butter_cookies hot_milk 98 4 gingerbread_cookies hot_milk 84 9 peanut_butter_cookies hot_milk 86 4 gingerbread_cookies hot_milk 79 11 brown_sugar_cookies fresh_juice 119 5 gingerbread_cookies beer 116 11 gingerbread_cookies coffee 100 11 sugar_cookies fresh_juice 101 5 chocolate_chip_cookies hot_milk 107 3 brown_sugar_cookies cold_milk 112 8 chocolate_chip_cookies beer 42 3 brown_sugar_cookies fresh_juice 106 5 chocolate_chip_cookies hot_milk 75 6 gingerbread_cookies beer 115 2 gingerbread_cookies beer 44 8 peanut_butter_cookies fresh_juice 90 8 sugar_cookies beer 68 11 peanut_butter_cookies cold_milk 98 10 sugar_cookies coffee 100 9 chocolate_chip_cookies hot_milk 32 6 peanut_butter_cookies beer 93 10 sugar_cookies fresh_juice 53 10 gingerbread_cookies fresh_juice 93 5 sugar_cookies fresh_juice 114 8 sugar_cookies fresh_juice 59 4 chocolate_chip_cookies fresh_juice 51 9 peanut_butter_cookies beer 44 3 chocolate_chip_cookies beer 63 5 sugar_cookies hot_milk 74 11 sugar_cookies hot_milk 34 3 brown_sugar_cookies hot_milk 65 6 chocolate_chip_cookies beer 30 5 peanut_butter_cookies cold_milk 114 6 peanut_butter_cookies cold_milk 97 8 brown_sugar_cookies fresh_juice 51 10 brown_sugar_cookies beer 96 7 gingerbread_cookies fresh_juice 80 3 gingerbread_cookies beer 55 11 sugar_cookies coffee 55 5 gingerbread_cookies cold_milk 73 5 gingerbread_cookies beer 63 4 gingerbread_cookies fresh_juice 70 2 sugar_cookies cold_milk 57 11 peanut_butter_cookies coffee 61 9 peanut_butter_cookies cold_milk 117 5 brown_sugar_cookies beer 69 7 gingerbread_cookies beer 86 3 sugar_cookies fresh_juice 39 3 peanut_butter_cookies coffee 83 4 brown_sugar_cookies hot_milk 59 8 sugar_cookies cold_milk 88 7 gingerbread_cookies cold_milk 57 4 brown_sugar_cookies beer 86 11 gingerbread_cookies beer 78 2 peanut_butter_cookies fresh_juice 83 7 gingerbread_cookies hot_milk 44 6 gingerbread_cookies hot_milk 66 11 gingerbread_cookies coffee 33 9 brown_sugar_cookies beer 37 3 brown_sugar_cookies coffee 60 3 gingerbread_cookies fresh_juice 81 9 peanut_butter_cookies hot_milk 55 4 gingerbread_cookies cold_milk 76 5 peanut_butter_cookies cold_milk 49 8 sugar_cookies coffee 109 3 brown_sugar_cookies fresh_juice 50 11 brown_sugar_cookies hot_milk 53 9 brown_sugar_cookies coffee 102 6 peanut_butter_cookies hot_milk 112 7 sugar_cookies beer 61 6 gingerbread_cookies hot_milk 71 7 brown_sugar_cookies hot_milk 104 5 brown_sugar_cookies cold_milk 85 3 brown_sugar_cookies cold_milk 115 7 sugar_cookies beer 80 9 sugar_cookies fresh_juice 45 5 gingerbread_cookies beer 73 9 sugar_cookies hot_milk 56 4 gingerbread_cookies cold_milk 99 10 sugar_cookies hot_milk 46 10 peanut_butter_cookies coffee 98 4 brown_sugar_cookies fresh_juice 62 2 gingerbread_cookies fresh_juice 32 10 chocolate_chip_cookies fresh_juice 114 2 peanut_butter_cookies hot_milk 117 5 gingerbread_cookies hot_milk 98 5 gingerbread_cookies coffee 32 2 gingerbread_cookies cold_milk 48 8 brown_sugar_cookies coffee 88 5 gingerbread_cookies hot_milk 103 4 gingerbread_cookies fresh_juice 56 5 gingerbread_cookies coffee 75 10 sugar_cookies hot_milk 102 8 gingerbread_cookies coffee 98 11 chocolate_chip_cookies coffee 118 7 peanut_butter_cookies beer 117 9 peanut_butter_cookies beer 78 8 brown_sugar_cookies cold_milk 89 5 sugar_cookies cold_milk 43 8 sugar_cookies beer 58 11 chocolate_chip_cookies beer 80 11 brown_sugar_cookies coffee 71 8 gingerbread_cookies fresh_juice 97 8 gingerbread_cookies hot_milk 65 4 gingerbread_cookies beer 81 7 chocolate_chip_cookies cold_milk 112 9 brown_sugar_cookies beer 106 4 peanut_butter_cookies coffee 49 11 gingerbread_cookies coffee 102 6 sugar_cookies hot_milk 61 7 sugar_cookies fresh_juice 78 2 sugar_cookies hot_milk 94 6 sugar_cookies cold_milk 34 6 chocolate_chip_cookies beer 109 8 brown_sugar_cookies fresh_juice 82 3 sugar_cookies cold_milk 105 11 sugar_cookies coffee 60 9 gingerbread_cookies coffee 102 11 sugar_cookies hot_milk 43 8 chocolate_chip_cookies hot_milk 87 3 brown_sugar_cookies coffee 101 2 brown_sugar_cookies beer 68 5 chocolate_chip_cookies fresh_juice 110 3 sugar_cookies cold_milk 58 5 sugar_cookies cold_milk 63 9 brown_sugar_cookies fresh_juice 62 5 chocolate_chip_cookies beer 95 4 brown_sugar_cookies cold_milk 73 10 sugar_cookies coffee 47 9 brown_sugar_cookies hot_milk 78 11 chocolate_chip_cookies hot_milk 89 8 sugar_cookies hot_milk 109 11 chocolate_chip_cookies beer 96 2 sugar_cookies beer 91 5 chocolate_chip_cookies beer 79 5 chocolate_chip_cookies cold_milk 60 9 sugar_cookies coffee 107 4 brown_sugar_cookies coffee 35 11 brown_sugar_cookies fresh_juice 52 2 peanut_butter_cookies beer 75 4 peanut_butter_cookies coffee 86 5 chocolate_chip_cookies hot_milk 94 6 brown_sugar_cookies cold_milk 74 5 brown_sugar_cookies fresh_juice 58 2 peanut_butter_cookies cold_milk 69 9 brown_sugar_cookies hot_milk 33 4 chocolate_chip_cookies fresh_juice 40 6 chocolate_chip_cookies coffee 33 3 peanut_butter_cookies fresh_juice 99 2 chocolate_chip_cookies fresh_juice 89 11 chocolate_chip_cookies hot_milk 46 11 sugar_cookies beer 55 9 chocolate_chip_cookies coffee 60 8 sugar_cookies coffee 97 5 gingerbread_cookies cold_milk 89 2 peanut_butter_cookies cold_milk 101 8 brown_sugar_cookies beer 32 6 chocolate_chip_cookies hot_milk 95 7 chocolate_chip_cookies coffee 89 6 sugar_cookies coffee 117 10 gingerbread_cookies cold_milk 65 7 brown_sugar_cookies cold_milk 101 4 brown_sugar_cookies hot_milk 68 6 sugar_cookies cold_milk 86 7 peanut_butter_cookies cold_milk 53 3 peanut_butter_cookies coffee 55 7 gingerbread_cookies cold_milk 46 11 peanut_butter_cookies hot_milk 85 2 chocolate_chip_cookies cold_milk 68 2 brown_sugar_cookies beer 40 2 sugar_cookies beer 37 2 gingerbread_cookies beer
Output
1396

Hard Validator
Input
184 99 8 gingerbread_cookies cold_milk 88 3 sugar_cookies cold_milk 53 2 peanut_butter_cookies coffee 77 9 sugar_cookies beer 74 3 sugar_cookies hot_milk 58 6 gingerbread_cookies fresh_juice 48 8 chocolate_chip_cookies fresh_juice 111 6 brown_sugar_cookies beer 108 8 gingerbread_cookies coffee 112 5 brown_sugar_cookies hot_milk 118 6 gingerbread_cookies cold_milk 40 10 brown_sugar_cookies cold_milk 49 6 chocolate_chip_cookies coffee 101 7 chocolate_chip_cookies beer 81 2 sugar_cookies beer 30 3 gingerbread_cookies cold_milk 91 6 gingerbread_cookies cold_milk 81 8 brown_sugar_cookies hot_milk 35 10 peanut_butter_cookies coffee 106 9 sugar_cookies coffee 105 6 peanut_butter_cookies fresh_juice 32 11 sugar_cookies coffee 41 4 brown_sugar_cookies cold_milk 81 8 brown_sugar_cookies cold_milk 75 7 chocolate_chip_cookies beer 93 10 gingerbread_cookies cold_milk 76 10 brown_sugar_cookies hot_milk 47 7 gingerbread_cookies hot_milk 61 3 sugar_cookies fresh_juice 90 6 gingerbread_cookies cold_milk 83 4 peanut_butter_cookies coffee 67 4 brown_sugar_cookies hot_milk 73 5 peanut_butter_cookies fresh_juice 45 6 chocolate_chip_cookies beer 94 5 brown_sugar_cookies beer 44 11 sugar_cookies beer 103 2 sugar_cookies coffee 110 5 sugar_cookies cold_milk 78 2 chocolate_chip_cookies hot_milk 61 4 gingerbread_cookies fresh_juice 104 3 sugar_cookies beer 119 9 sugar_cookies fresh_juice 61 8 chocolate_chip_cookies fresh_juice 39 4 brown_sugar_cookies hot_milk 99 8 peanut_butter_cookies cold_milk 49 7 peanut_butter_cookies hot_milk 72 5 chocolate_chip_cookies cold_milk 55 6 peanut_butter_cookies hot_milk 64 4 peanut_butter_cookies beer 50 10 peanut_butter_cookies hot_milk 115 7 gingerbread_cookies fresh_juice 47 5 brown_sugar_cookies coffee 35 7 gingerbread_cookies beer 44 11 gingerbread_cookies coffee 86 5 peanut_butter_cookies fresh_juice 110 11 brown_sugar_cookies hot_milk 58 8 brown_sugar_cookies beer 111 5 sugar_cookies coffee 61 10 sugar_cookies cold_milk 41 9 brown_sugar_cookies cold_milk 64 5 gingerbread_cookies beer 102 2 brown_sugar_cookies fresh_juice 114 8 gingerbread_cookies beer 71 9 chocolate_chip_cookies coffee 70 9 sugar_cookies hot_milk 72 9 sugar_cookies coffee 78 9 brown_sugar_cookies beer 104 11 brown_sugar_cookies cold_milk 40 10 gingerbread_cookies cold_milk 101 9 peanut_butter_cookies hot_milk 57 2 peanut_butter_cookies coffee 86 9 peanut_butter_cookies cold_milk 40 5 gingerbread_cookies fresh_juice 62 10 gingerbread_cookies coffee 38 8 peanut_butter_cookies fresh_juice 83 4 gingerbread_cookies beer 103 5 brown_sugar_cookies hot_milk 43 5 brown_sugar_cookies hot_milk 87 8 brown_sugar_cookies beer 104 6 sugar_cookies fresh_juice 38 8 peanut_butter_cookies cold_milk 70 8 peanut_butter_cookies coffee 67 4 brown_sugar_cookies fresh_juice 46 9 peanut_butter_cookies hot_milk 79 10 gingerbread_cookies cold_milk 34 11 gingerbread_cookies hot_milk 63 11 gingerbread_cookies coffee 106 7 brown_sugar_cookies hot_milk 107 4 chocolate_chip_cookies fresh_juice 96 5 chocolate_chip_cookies fresh_juice 31 8 peanut_butter_cookies hot_milk 52 6 chocolate_chip_cookies cold_milk 102 8 chocolate_chip_cookies coffee 58 5 peanut_butter_cookies hot_milk 91 8 brown_sugar_cookies cold_milk 43 11 gingerbread_cookies coffee 60 4 gingerbread_cookies fresh_juice 52 5 chocolate_chip_cookies cold_milk 92 6 gingerbread_cookies beer 81 2 gingerbread_cookies coffee 89 8 peanut_butter_cookies cold_milk 109 8 sugar_cookies fresh_juice 57 7 peanut_butter_cookies cold_milk 97 5 brown_sugar_cookies beer 52 11 gingerbread_cookies cold_milk 99 8 chocolate_chip_cookies fresh_juice 31 7 peanut_butter_cookies hot_milk 99 4 gingerbread_cookies hot_milk 85 5 gingerbread_cookies hot_milk 31 5 brown_sugar_cookies fresh_juice 61 9 peanut_butter_cookies fresh_juice 32 10 gingerbread_cookies cold_milk 65 3 chocolate_chip_cookies fresh_juice 63 6 sugar_cookies fresh_juice 35 4 chocolate_chip_cookies beer 86 9 chocolate_chip_cookies fresh_juice 89 5 gingerbread_cookies cold_milk 84 9 peanut_butter_cookies fresh_juice 109 2 gingerbread_cookies coffee 67 2 brown_sugar_cookies cold_milk 110 2 chocolate_chip_cookies hot_milk 105 8 sugar_cookies coffee 98 5 peanut_butter_cookies beer 116 6 peanut_butter_cookies coffee 43 11 chocolate_chip_cookies fresh_juice 115 8 gingerbread_cookies fresh_juice 61 8 sugar_cookies coffee 61 7 gingerbread_cookies fresh_juice 70 10 peanut_butter_cookies hot_milk 114 3 brown_sugar_cookies fresh_juice 32 3 chocolate_chip_cookies fresh_juice 72 7 gingerbread_cookies hot_milk 38 8 chocolate_chip_cookies fresh_juice 40 3 chocolate_chip_cookies cold_milk 83 3 gingerbread_cookies hot_milk 55 9 gingerbread_cookies cold_milk 97 3 sugar_cookies fresh_juice 34 7 brown_sugar_cookies hot_milk 111 4 chocolate_chip_cookies cold_milk 32 2 peanut_butter_cookies fresh_juice 88 11 chocolate_chip_cookies cold_milk 52 3 brown_sugar_cookies cold_milk 47 3 chocolate_chip_cookies cold_milk 97 5 sugar_cookies cold_milk 113 4 peanut_butter_cookies beer 89 9 peanut_butter_cookies cold_milk 95 11 peanut_butter_cookies cold_milk 45 2 peanut_butter_cookies beer 44 3 peanut_butter_cookies cold_milk 103 10 chocolate_chip_cookies coffee 99 4 chocolate_chip_cookies fresh_juice 75 10 peanut_butter_cookies beer 36 9 peanut_butter_cookies hot_milk 49 7 sugar_cookies fresh_juice 31 7 brown_sugar_cookies hot_milk 44 10 chocolate_chip_cookies coffee 89 8 sugar_cookies coffee 48 9 chocolate_chip_cookies cold_milk 79 7 peanut_butter_cookies beer 84 10 chocolate_chip_cookies coffee 48 11 sugar_cookies fresh_juice 107 10 peanut_butter_cookies hot_milk 111 8 brown_sugar_cookies fresh_juice 67 11 sugar_cookies coffee 100 7 sugar_cookies beer 56 4 brown_sugar_cookies fresh_juice 66 4 sugar_cookies fresh_juice 99 3 brown_sugar_cookies fresh_juice 118 5 chocolate_chip_cookies cold_milk 84 4 gingerbread_cookies beer 95 10 gingerbread_cookies beer 83 7 sugar_cookies fresh_juice 51 10 peanut_butter_cookies cold_milk 80 3 gingerbread_cookies beer 33 6 peanut_butter_cookies coffee 116 9 chocolate_chip_cookies cold_milk 32 11 chocolate_chip_cookies coffee 52 5 brown_sugar_cookies fresh_juice 117 11 sugar_cookies coffee 39 2 chocolate_chip_cookies coffee 102 4 brown_sugar_cookies cold_milk 77 3 gingerbread_cookies fresh_juice 110 7 peanut_butter_cookies cold_milk 78 2 chocolate_chip_cookies fresh_juice
Output
1500

no houses Test
Input
0
Output
0

Extreme Validator
Input
199 118 11 brown_sugar_cookies hot_milk 73 10 sugar_cookies hot_milk 46 4 gingerbread_cookies fresh_juice 53 5 chocolate_chip_cookies cold_milk 61 2 brown_sugar_cookies beer 41 3 sugar_cookies hot_milk 49 5 sugar_cookies fresh_juice 96 7 chocolate_chip_cookies beer 105 2 sugar_cookies coffee 85 4 chocolate_chip_cookies cold_milk 80 7 gingerbread_cookies cold_milk 113 7 sugar_cookies cold_milk 30 10 brown_sugar_cookies hot_milk 118 9 peanut_butter_cookies coffee 39 7 brown_sugar_cookies coffee 38 7 chocolate_chip_cookies fresh_juice 67 3 sugar_cookies hot_milk 34 9 chocolate_chip_cookies hot_milk 49 8 sugar_cookies cold_milk 64 8 brown_sugar_cookies fresh_juice 99 10 gingerbread_cookies beer 42 3 chocolate_chip_cookies fresh_juice 66 6 brown_sugar_cookies beer 85 2 chocolate_chip_cookies coffee 61 7 brown_sugar_cookies beer 68 10 brown_sugar_cookies fresh_juice 72 10 peanut_butter_cookies fresh_juice 50 11 chocolate_chip_cookies cold_milk 72 9 chocolate_chip_cookies hot_milk 31 9 sugar_cookies fresh_juice 42 10 gingerbread_cookies beer 30 8 brown_sugar_cookies beer 111 3 gingerbread_cookies cold_milk 68 2 peanut_butter_cookies hot_milk 39 3 sugar_cookies fresh_juice 70 3 peanut_butter_cookies fresh_juice 72 11 gingerbread_cookies beer 57 8 peanut_butter_cookies hot_milk 116 11 brown_sugar_cookies fresh_juice 96 8 chocolate_chip_cookies hot_milk 113 9 gingerbread_cookies hot_milk 104 6 peanut_butter_cookies cold_milk 86 3 peanut_butter_cookies hot_milk 94 6 chocolate_chip_cookies hot_milk 91 6 peanut_butter_cookies cold_milk 75 11 peanut_butter_cookies hot_milk 111 7 gingerbread_cookies beer 109 4 chocolate_chip_cookies coffee 113 11 brown_sugar_cookies cold_milk 37 6 chocolate_chip_cookies coffee 86 2 gingerbread_cookies hot_milk 114 6 brown_sugar_cookies fresh_juice 100 6 gingerbread_cookies beer 66 6 gingerbread_cookies fresh_juice 71 8 sugar_cookies cold_milk 64 5 gingerbread_cookies cold_milk 98 11 gingerbread_cookies fresh_juice 34 4 gingerbread_cookies coffee 65 5 sugar_cookies cold_milk 104 9 peanut_butter_cookies hot_milk 34 9 sugar_cookies fresh_juice 91 10 sugar_cookies beer 94 4 gingerbread_cookies hot_milk 69 3 sugar_cookies hot_milk 95 6 gingerbread_cookies fresh_juice 51 9 brown_sugar_cookies beer 52 4 gingerbread_cookies cold_milk 37 6 peanut_butter_cookies cold_milk 35 5 chocolate_chip_cookies hot_milk 99 6 chocolate_chip_cookies beer 76 10 chocolate_chip_cookies coffee 33 2 gingerbread_cookies hot_milk 47 3 chocolate_chip_cookies hot_milk 51 4 sugar_cookies hot_milk 76 4 gingerbread_cookies hot_milk 78 7 chocolate_chip_cookies coffee 97 11 sugar_cookies beer 66 5 sugar_cookies beer 91 9 gingerbread_cookies hot_milk 119 10 chocolate_chip_cookies beer 66 2 peanut_butter_cookies fresh_juice 69 4 brown_sugar_cookies hot_milk 96 8 peanut_butter_cookies coffee 80 6 gingerbread_cookies cold_milk 82 10 chocolate_chip_cookies cold_milk 57 2 chocolate_chip_cookies hot_milk 64 11 chocolate_chip_cookies beer 102 9 sugar_cookies beer 64 4 gingerbread_cookies hot_milk 68 10 chocolate_chip_cookies beer 82 11 sugar_cookies fresh_juice 111 6 chocolate_chip_cookies beer 66 7 peanut_butter_cookies fresh_juice 44 8 peanut_butter_cookies coffee 39 9 brown_sugar_cookies cold_milk 88 4 peanut_butter_cookies coffee 66 11 peanut_butter_cookies hot_milk 108 11 chocolate_chip_cookies fresh_juice 86 11 chocolate_chip_cookies hot_milk 45 8 sugar_cookies fresh_juice 104 9 sugar_cookies hot_milk 39 9 chocolate_chip_cookies hot_milk 67 2 sugar_cookies fresh_juice 75 10 brown_sugar_cookies fresh_juice 92 8 brown_sugar_cookies fresh_juice 47 7 chocolate_chip_cookies hot_milk 79 5 gingerbread_cookies beer 112 4 brown_sugar_cookies hot_milk 99 3 brown_sugar_cookies cold_milk 52 8 sugar_cookies coffee 80 9 brown_sugar_cookies fresh_juice 47 4 brown_sugar_cookies hot_milk 71 7 gingerbread_cookies cold_milk 88 2 peanut_butter_cookies hot_milk 37 8 chocolate_chip_cookies beer 38 7 brown_sugar_cookies beer 105 5 peanut_butter_cookies fresh_juice 99 5 gingerbread_cookies coffee 36 8 sugar_cookies beer 77 3 peanut_butter_cookies coffee 33 9 sugar_cookies hot_milk 99 9 brown_sugar_cookies coffee 56 6 peanut_butter_cookies fresh_juice 77 3 peanut_butter_cookies beer 70 10 gingerbread_cookies coffee 117 3 sugar_cookies coffee 87 7 sugar_cookies beer 42 5 chocolate_chip_cookies beer 113 4 chocolate_chip_cookies beer 69 7 peanut_butter_cookies cold_milk 30 2 peanut_butter_cookies fresh_juice 44 2 chocolate_chip_cookies fresh_juice 42 9 gingerbread_cookies fresh_juice 110 9 brown_sugar_cookies fresh_juice 84 8 peanut_butter_cookies cold_milk 85 5 sugar_cookies beer 69 8 sugar_cookies hot_milk 71 7 peanut_butter_cookies beer 42 5 chocolate_chip_cookies coffee 39 7 sugar_cookies coffee 68 4 brown_sugar_cookies cold_milk 41 6 chocolate_chip_cookies hot_milk 112 10 brown_sugar_cookies fresh_juice 74 11 sugar_cookies beer 90 6 peanut_butter_cookies coffee 88 6 chocolate_chip_cookies coffee 31 3 chocolate_chip_cookies cold_milk 89 5 gingerbread_cookies fresh_juice 33 6 sugar_cookies fresh_juice 69 9 peanut_butter_cookies beer 38 3 peanut_butter_cookies hot_milk 65 6 sugar_cookies beer 57 2 peanut_butter_cookies fresh_juice 72 8 gingerbread_cookies coffee 54 5 brown_sugar_cookies cold_milk 61 10 chocolate_chip_cookies coffee 97 4 brown_sugar_cookies coffee 66 3 gingerbread_cookies coffee 54 8 brown_sugar_cookies hot_milk 100 6 chocolate_chip_cookies hot_milk 107 7 sugar_cookies hot_milk 80 11 brown_sugar_cookies coffee 101 10 gingerbread_cookies beer 46 3 peanut_butter_cookies fresh_juice 86 11 sugar_cookies cold_milk 61 2 chocolate_chip_cookies fresh_juice 87 7 brown_sugar_cookies fresh_juice 32 8 peanut_butter_cookies cold_milk 72 2 peanut_butter_cookies fresh_juice 93 5 peanut_butter_cookies beer 64 7 gingerbread_cookies beer 79 9 brown_sugar_cookies cold_milk 110 9 sugar_cookies cold_milk 81 7 gingerbread_cookies hot_milk 79 10 peanut_butter_cookies hot_milk 84 2 peanut_butter_cookies cold_milk 37 8 gingerbread_cookies fresh_juice 65 2 brown_sugar_cookies hot_milk 106 8 chocolate_chip_cookies beer 68 10 chocolate_chip_cookies beer 82 2 gingerbread_cookies beer 70 10 gingerbread_cookies fresh_juice 68 9 brown_sugar_cookies cold_milk 103 3 gingerbread_cookies coffee 81 6 brown_sugar_cookies cold_milk 102 5 brown_sugar_cookies hot_milk 67 10 sugar_cookies fresh_juice 106 2 brown_sugar_cookies fresh_juice 70 2 gingerbread_cookies cold_milk 79 9 gingerbread_cookies beer 114 9 chocolate_chip_cookies cold_milk 97 9 chocolate_chip_cookies cold_milk 53 11 brown_sugar_cookies hot_milk 86 5 gingerbread_cookies coffee 88 9 gingerbread_cookies hot_milk 32 9 gingerbread_cookies fresh_juice 58 4 chocolate_chip_cookies coffee 83 7 sugar_cookies beer 40 5 sugar_cookies coffee
Output
1643

Solution language

Solution

Stub generator input
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants